diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-27 16:41:43 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-06-01 18:00:53 +0100 |
commit | 6eb311eea6fca45495b3a48c396f5aa8e8f7e714 (patch) | |
tree | 548c60984e7c1a59ce9fc4c0bef5985b03131fb8 /crypto/x509v3 | |
parent | 97323d57cd6dbbd0c06383dea3cc1b90d11f2557 (diff) | |
download | openssl-6eb311eea6fca45495b3a48c396f5aa8e8f7e714.tar.gz |
Don't leak memory from notice_section function on error path
The notice_section() function allocates a STACK_OF(CONF_VALUE) but
then fails to free it on an error path.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/v3_cpols.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index fe722b14a7..81d0d996a9 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -295,6 +295,7 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, if (!nos || !sk_CONF_VALUE_num(nos)) { X509V3err(X509V3_F_NOTICE_SECTION, X509V3_R_INVALID_NUMBERS); X509V3_conf_err(cnf); + sk_CONF_VALUE_pop_free(nos, X509V3_conf_free); goto err; } ret = nref_nos(nref->noticenos, nos); |