From: Kurt Roeckx Date: Sun, 7 Dec 2014 21:25:39 +0000 (+0100) Subject: Fix memory leak in the apps X-Git-Tag: OpenSSL_1_0_1k~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f14a6bf5151602d93866059af0f972710446a55c;p=oweals%2Fopenssl.git Fix memory leak in the apps The BIO_free() allocated ex_data again that we already freed. Reviewed-by: Richard Levitte --- diff --git a/apps/openssl.c b/apps/openssl.c index 71e1e48ece..5372459456 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -435,9 +435,7 @@ end: if (prog != NULL) lh_FUNCTION_free(prog); if (arg.data != NULL) OPENSSL_free(arg.data); - apps_shutdown(); - CRYPTO_mem_leaks(bio_err); if (bio_err != NULL) { BIO_free(bio_err); @@ -450,6 +448,9 @@ end: OPENSSL_free(Argv); } #endif + apps_shutdown(); + CRYPTO_mem_leaks(bio_err); + OPENSSL_EXIT(ret); }