GH354: Memory leak fixes

Fix more potential leaks in X509_verify_cert()
Fix memory leak in ClientHello test
Fix memory leak in gost2814789 test
Fix potential memory leak in PKCS7_verify()
Fix potential memory leaks in X509_add1_reject_object()
Refactor to use "goto err" in cleanup.

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 55500ea7c4)
This commit is contained in:
Alessandro Ghedini
2015-08-27 23:07:07 -04:00
committed by Rich Salz
parent 1d7df236dc
commit c8491de393
4 changed files with 14 additions and 23 deletions

View File

@@ -213,6 +213,7 @@ int main(int argc, char *argv[])
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
CRYPTO_mem_leaks(err);
BIO_free(err);
return testresult?0:1;
}