aboutsummaryrefslogtreecommitdiff
path: root/crypto/x509v3/v3_cpols.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-27 16:41:43 +0100
committerMatt Caswell <matt@openssl.org>2016-06-01 18:00:53 +0100
commit6eb311eea6fca45495b3a48c396f5aa8e8f7e714 (patch)
tree548c60984e7c1a59ce9fc4c0bef5985b03131fb8 /crypto/x509v3/v3_cpols.c
parent97323d57cd6dbbd0c06383dea3cc1b90d11f2557 (diff)
downloadopenssl-6eb311eea6fca45495b3a48c396f5aa8e8f7e714.zip
openssl-6eb311eea6fca45495b3a48c396f5aa8e8f7e714.tar.gz
openssl-6eb311eea6fca45495b3a48c396f5aa8e8f7e714.tar.bz2
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/v3_cpols.c')
-rw-r--r--crypto/x509v3/v3_cpols.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index fe722b1..81d0d99 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);