From e014fece509a5c486c685f384e1286fba2653ab7 Mon Sep 17 00:00:00 2001 From: makise-homura Date: Sat, 22 Aug 2020 23:56:46 +0300 Subject: [PATCH] Don't forget to free G, P, Q, ctr_drbg, and entropy I might be wrong, but lcc's optimizer is curious about this, and I am too: shouldn't we free allocated stuff correctly before exiting `dh_genprime` in this certain point of code? Signed-off-by: makise-homura --- programs/pkey/dh_genprime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c index 5293f899c..81876b3cf 100644 --- a/programs/pkey/dh_genprime.c +++ b/programs/pkey/dh_genprime.c @@ -91,7 +91,7 @@ int main( int argc, char **argv ) { usage: mbedtls_printf( USAGE ); - mbedtls_exit( exit_code ); + goto exit; } for( i = 1; i < argc; i++ )