mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Free memory on error in PKCS7_dataFinal()
The PKCS7_dataFinal() function allocates a memory buffer but then fails to free it on an error condition. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
460c5e1d2f
commit
d54ac5c4bf
@ -808,6 +808,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
|
||||
goto err;
|
||||
|
||||
if (!EVP_SignFinal(ctx_tmp, abuf, &abuflen, si->pkey)) {
|
||||
OPENSSL_free(abuf);
|
||||
PKCS7err(PKCS7_F_PKCS7_DATAFINAL, ERR_R_EVP_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user