From 03b4ef6a05c0b87f0c1bb5880520204686c94b38 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 aefd6d608..2ccc63b6e 100644 --- a/programs/pkey/dh_genprime.c +++ b/programs/pkey/dh_genprime.c @@ -118,7 +118,7 @@ int main( int argc, char **argv ) { usage: mbedtls_printf( USAGE ); - mbedtls_exit( exit_code ); + goto exit; } for( i = 1; i < argc; i++ )