aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/asn1/x_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/asn1/x_name.c')
-rw-r--r--crypto/openssl/crypto/asn1/x_name.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/openssl/crypto/asn1/x_name.c b/crypto/openssl/crypto/asn1/x_name.c
index 04380abc3ff9..9a1a9f415ff3 100644
--- a/crypto/openssl/crypto/asn1/x_name.c
+++ b/crypto/openssl/crypto/asn1/x_name.c
@@ -196,7 +196,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len
*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;
}