diff options
| author | beck <> | 2014-04-23 04:33:10 +0000 | 
|---|---|---|
| committer | beck <> | 2014-04-23 04:33:10 +0000 | 
| commit | 63dce68244cb92dbbf98350874c7923ed37a57cc (patch) | |
| tree | 5feb2ea7b190b690289386bf381f0b1fda4bb9d0 | |
| parent | 45285546ce7196a8f262ee538b9b149a80568284 (diff) | |
| download | openbsd-63dce68244cb92dbbf98350874c7923ed37a57cc.tar.gz openbsd-63dce68244cb92dbbf98350874c7923ed37a57cc.tar.bz2 openbsd-63dce68244cb92dbbf98350874c7923ed37a57cc.zip  | |
Make sure ret->name is NULL'ed before return when freeing.
from Dirk Engling <erdgeist@erdgeist.org>
| -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 | ||
