From f4428d8101c504f427625270a1dfb1d4be89987f Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Sat, 14 Sep 2002 11:18:05 +0000 Subject: merge with openssl-0.9.7-stable-SNAP-20020911, new minor for libcrypto (_X509_REQ_print_ex) tested by miod@, pb@ --- lib/libcrypto/pem/pem_lib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/libcrypto/pem') diff --git a/lib/libcrypto/pem/pem_lib.c b/lib/libcrypto/pem/pem_lib.c index 18b751a91a8..a8db6ffbf5c 100644 --- a/lib/libcrypto/pem/pem_lib.c +++ b/lib/libcrypto/pem/pem_lib.c @@ -366,8 +366,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); } -- cgit v1.2.3