Skip to content

Commit

Permalink
Fix memory leak in the apps
Browse files Browse the repository at this point in the history
The BIO_free() allocated ex_data again that we already freed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
  • Loading branch information
kroeckx committed Dec 30, 2014
1 parent 32dfde1 commit 8c00f4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,7 @@ int main(int Argc, char *ARGV[])
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);
Expand All @@ -450,6 +448,9 @@ int main(int Argc, char *ARGV[])
OPENSSL_free(Argv);
}
#endif
apps_shutdown();
CRYPTO_mem_leaks(bio_err);

OPENSSL_EXIT(ret);
}

Expand Down

0 comments on commit 8c00f4c

Please sign in to comment.