Commit 34b9acbd authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarRichard Levitte <levitte@openssl.org>
parent 5e8129f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;