From 88f8f41e5af4dfe7ef5a0b21657bb1065bd76ba5 Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Tue, 31 Oct 2017 21:27:59 +0000 Subject: [PATCH] Move zeroize func call to end of program in zeroize.c --- programs/test/zeroize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/test/zeroize.c b/programs/test/zeroize.c index 7f3e8b4013..efd5980012 100644 --- a/programs/test/zeroize.c +++ b/programs/test/zeroize.c @@ -79,13 +79,13 @@ int main( int argc, char** argv ) if( p - buf != 0 ) { mbedtls_printf( "%s\n", buf ); - mbedtls_zeroize( buf, sizeof( buf ) ); exit_code = MBEDTLS_EXIT_SUCCESS; } else mbedtls_printf( "The file is empty!\n" ); fclose( fp ); + mbedtls_zeroize( buf, sizeof( buf ) ); return( exit_code ); }