diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-27 14:17:33 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-28 13:13:09 +0100 |
commit | 34b9acbd3f81b46967f692c0af49020c8c405746 (patch) | |
tree | d9fcc2d0156619c1c9183014ee036cf32f7209fb | |
parent | 5e8129f278f5358243b4a8b3651e795d6a32696d (diff) |
Free an ASN1_OBJECT in an error path
The r2i_certpol() function allocates an ASN1_OBJECT but can fail to free
it in an error path.
Reviewed-by: Richard Levitte <levitte@openssl.org>
-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 b4dd3ad9fe..f1db67f24e 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -188,6 +188,7 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, pol = POLICYINFO_new(); if (pol == NULL) { X509V3err(X509V3_F_R2I_CERTPOL, ERR_R_MALLOC_FAILURE); + ASN1_OBJECT_free(pobj); goto err; } pol->policyid = pobj; |