diff options
author | Bodo Möller <bodo@openssl.org> | 2011-09-05 09:57:15 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2011-09-05 09:57:15 +0000 |
commit | 7f1022a8b13499879b3928763787423949cf4911 (patch) | |
tree | b104af8fcb4839883f4e8b1e2e0287b8811314a4 /crypto/asn1 | |
parent | edf6b025b11919492af4e34cefbd78b26ece4c1c (diff) |
Fix memory leak on bad inputs.
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/x_name.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asn1/x_name.c b/crypto/asn1/x_name.c index 063bf7c16b..49be08b4da 100644 --- a/crypto/asn1/x_name.c +++ b/crypto/asn1/x_name.c @@ -214,7 +214,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, *val = nm.a; *in = p; return ret; - err: +err: + if (nm.x != NULL) + X509_NAME_free(nm.x); ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); return 0; } |