From: Ben Laurie Date: Tue, 22 Apr 2014 12:11:56 +0000 (+0100) Subject: Fix double frees. X-Git-Tag: OpenSSL_1_0_1h~72 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9c8dc84ac16a2f21063ae36809d202d0284ecf82;p=oweals%2Fopenssl.git Fix double frees. --- diff --git a/CHANGES b/CHANGES index b790cee98b..def57902be 100644 --- a/CHANGES +++ b/CHANGES @@ -4,7 +4,8 @@ Changes between 1.0.1g and 1.0.1h [xx XXX xxxx] - *) + *) Fix some double frees. These are not thought to be exploitable. + [mancha ] Changes between 1.0.1f and 1.0.1g [7 Apr 2014] diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index 77fda3b82a..4c12a9dcc9 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -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); diff --git a/crypto/ts/ts_rsp_verify.c b/crypto/ts/ts_rsp_verify.c index afe16afbe4..b7d170afac 100644 --- a/crypto/ts/ts_rsp_verify.c +++ b/crypto/ts/ts_rsp_verify.c @@ -629,6 +629,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info, X509_ALGOR_free(*md_alg); OPENSSL_free(*imprint); *imprint_len = 0; + *imprint = NULL; return 0; } diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 9975e20873..1384ab0cbf 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -1356,6 +1356,7 @@ int dtls1_send_server_key_exchange(SSL *s) (unsigned char *)encodedPoint, encodedlen); OPENSSL_free(encodedPoint); + encodedPoint = NULL; p += encodedlen; } #endif