diff options
author | beck <> | 2014-04-23 04:33:10 +0000 |
---|---|---|
committer | beck <> | 2014-04-23 04:33:10 +0000 |
commit | 7c4d28eb9b6a63a2986168acc9ac763712405eee (patch) | |
tree | 5feb2ea7b190b690289386bf381f0b1fda4bb9d0 /src | |
parent | 30098660c30072420abb8eaeadea27f34cea9d68 (diff) | |
download | openbsd-7c4d28eb9b6a63a2986168acc9ac763712405eee.tar.gz openbsd-7c4d28eb9b6a63a2986168acc9ac763712405eee.tar.bz2 openbsd-7c4d28eb9b6a63a2986168acc9ac763712405eee.zip |
Make sure ret->name is NULL'ed before return when freeing.
from Dirk Engling <erdgeist@erdgeist.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/x_x509.c | 1 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/x_x509.c | 1 |
2 files changed, 2 insertions, 0 deletions
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) | |||
125 | #endif | 125 | #endif |
126 | if (ret->name != NULL) | 126 | if (ret->name != NULL) |
127 | free(ret->name); | 127 | free(ret->name); |
128 | ret->name = NULL; | ||
128 | break; | 129 | break; |
129 | } | 130 | } |
130 | 131 | ||
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) | |||
125 | #endif | 125 | #endif |
126 | if (ret->name != NULL) | 126 | if (ret->name != NULL) |
127 | free(ret->name); | 127 | free(ret->name); |
128 | ret->name = NULL; | ||
128 | break; | 129 | break; |
129 | } | 130 | } |
130 | 131 | ||