diff options
author | Bodo Möller <bodo@openssl.org> | 2002-08-29 11:45:40 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-08-29 11:45:40 +0000 |
commit | 6ff7c95843b25ee818d986510cfd085a99a319a1 (patch) | |
tree | 6d327d59001b8c3b2607668c36b8471498aa0e15 /crypto/pem | |
parent | 41cc7096b84277073764181fdf303fe357aa9b0d (diff) |
don't memset(data,0,...) if data is NULL
Submitted by: anonymous
PR: 254
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_lib.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index c32044cf70..7066e67b39 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -368,8 +368,11 @@ err: memset(iv,0,sizeof(iv)); memset((char *)&ctx,0,sizeof(ctx)); memset(buf,0,PEM_BUFSIZE); - memset(data,0,(unsigned int)dsize); - OPENSSL_free(data); + if (data != NULL) + { + memset(data,0,(unsigned int)dsize); + OPENSSL_free(data); + } return(ret); } |