From 7c4d28eb9b6a63a2986168acc9ac763712405eee Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 23 Apr 2014 04:33:10 +0000 Subject: Make sure ret->name is NULL'ed before return when freeing. from Dirk Engling --- src/lib/libcrypto/asn1/x_x509.c | 1 + src/lib/libssl/src/crypto/asn1/x_x509.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/lib/libcrypto/asn1/x_x509.c b/src/lib/libcrypto/asn1/x_x509.c index e7d613e20f..e93d97d2c4 100644 --- a/src/lib/libcrypto/asn1/x_x509.c +++ b/src/lib/libcrypto/asn1/x_x509.c @@ -125,6 +125,7 @@ x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) #endif if (ret->name != NULL) free(ret->name); + ret->name = NULL; break; } diff --git a/src/lib/libssl/src/crypto/asn1/x_x509.c b/src/lib/libssl/src/crypto/asn1/x_x509.c index e7d613e20f..e93d97d2c4 100644 --- a/src/lib/libssl/src/crypto/asn1/x_x509.c +++ b/src/lib/libssl/src/crypto/asn1/x_x509.c @@ -125,6 +125,7 @@ x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) #endif if (ret->name != NULL) free(ret->name); + ret->name = NULL; break; } -- cgit v1.2.3-55-g6feb