From 4cedd38fe86b068fa027163a67849a681248cb9a Mon Sep 17 00:00:00 2001 From: tedu Date: Sun, 20 Apr 2014 04:45:09 +0000 Subject: [PATCH] reset imprint to NULL to avoid double free. from mancha1 at zoho --- lib/libcrypto/ts/ts_rsp_verify.c | 1 + lib/libssl/src/crypto/ts/ts_rsp_verify.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libcrypto/ts/ts_rsp_verify.c b/lib/libcrypto/ts/ts_rsp_verify.c index d51500b5d44..7484b10d608 100644 --- a/lib/libcrypto/ts/ts_rsp_verify.c +++ b/lib/libcrypto/ts/ts_rsp_verify.c @@ -626,6 +626,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info, err: X509_ALGOR_free(*md_alg); free(*imprint); + *imprint = NULL; *imprint_len = 0; return 0; } diff --git a/lib/libssl/src/crypto/ts/ts_rsp_verify.c b/lib/libssl/src/crypto/ts/ts_rsp_verify.c index d51500b5d44..7484b10d608 100644 --- a/lib/libssl/src/crypto/ts/ts_rsp_verify.c +++ b/lib/libssl/src/crypto/ts/ts_rsp_verify.c @@ -626,6 +626,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info, err: X509_ALGOR_free(*md_alg); free(*imprint); + *imprint = NULL; *imprint_len = 0; return 0; } -- 2.20.1