From: Matt Caswell Date: Wed, 27 Apr 2016 13:17:33 +0000 (+0100) Subject: Free an ASN1_OBJECT in an error path X-Git-Tag: OpenSSL_1_1_0-pre6~1024 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=34b9acbd3f81b46967f692c0af49020c8c405746;p=oweals%2Fopenssl.git 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 --- 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;