summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2014-12-07 22:25:39 +0100
committerKurt Roeckx <kurt@roeckx.be>2014-12-30 17:00:22 +0100
commitf14a6bf5151602d93866059af0f972710446a55c (patch)
tree9724a838ed24411b12268fc6d18fdcc4a26079d4
parent5dad57536f943964e082f243430e0a945bcabbad (diff)
Fix memory leak in the apps
The BIO_free() allocated ex_data again that we already freed. Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r--apps/openssl.c5
1 files changed, 3 insertions, 2 deletions
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);
}