diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-10-05 18:26:44 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-10-05 18:26:44 +0000 |
commit | 50ee48d2deb9a2b827cf8c454df00b1bf66388d9 (patch) | |
tree | 1ce478fed601c7950c6aad0db8c5383f05ee3eea /lib | |
parent | fc7ef023b3cdfc32d1fadc7781ece8d2a14dd53f (diff) |
Missing deallocation upon error.
ok deraadt@ guenther@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/src/crypto/x509v3/v3_conf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/x509v3/v3_conf.c b/lib/libssl/src/crypto/x509v3/v3_conf.c index c25e75c23be..08b9970efb8 100644 --- a/lib/libssl/src/crypto/x509v3/v3_conf.c +++ b/lib/libssl/src/crypto/x509v3/v3_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v3_conf.c,v 1.15 2014/07/11 08:44:49 jsing Exp $ */ +/* $OpenBSD: v3_conf.c,v 1.16 2014/10/05 18:26:43 miod Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -184,7 +184,7 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, { unsigned char *ext_der; int ext_len; - ASN1_OCTET_STRING *ext_oct; + ASN1_OCTET_STRING *ext_oct = NULL; X509_EXTENSION *ext; /* Convert internal representation to DER */ @@ -215,6 +215,7 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, return ext; merr: + M_ASN1_OCTET_STRING_free(ext_oct); X509V3err(X509V3_F_DO_EXT_I2D, ERR_R_MALLOC_FAILURE); return NULL; |