Fix double frees.
[openssl.git] / crypto / pkcs7 / pk7_doit.c
index 82e145b856d92c2ba966176c9bd737abe7520fa3..a0559b124ee1e644b757c785107533286d600cce 100644 (file)
@@ -928,6 +928,7 @@ int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
        if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0)
                goto err;
        OPENSSL_free(abuf);
+       abuf = NULL;
        if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
                goto err;
        abuf = OPENSSL_malloc(siglen);