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>
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index b4dd3ad..f1db67f 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c
@@ -188,6 +188,7 @@ pol = POLICYINFO_new(); if (pol == NULL) { X509V3err(X509V3_F_R2I_CERTPOL, ERR_R_MALLOC_FAILURE); + ASN1_OBJECT_free(pobj); goto err; } pol->policyid = pobj;