Fixes memory leaks in CT code
[openssl.git] / crypto / ct / ct_sct.c
index 35f815235f15d32223970c5051cd6be078ba7d65..2b7211d7ea42f42cb34e00c649bddc7753839fe6 100644 (file)
@@ -402,7 +402,7 @@ int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx)
             goto end;
         }
 
-        issuer_pkey = X509_get_pubkey(ctx->issuer);
+        issuer_pkey = X509_get0_pubkey(ctx->issuer);
 
         if (X509_PUBKEY_set(&pub, issuer_pkey) != 1)
             goto err;