Cleaned up location of init and free for some programs to prevent memory

leaks on incorrect arguments
This commit is contained in:
Paul Bakker 2014-04-17 16:02:36 +02:00
parent cbe3d0d5cc
commit 0c22610693
19 changed files with 95 additions and 48 deletions

View file

@ -146,9 +146,12 @@ static int write_private_key( pk_context *key, const char *output_file )
return( -1 );
if( fwrite( c, 1, len, f ) != len )
{
fclose( f );
return( -1 );
}
fclose(f);
fclose( f );
return( 0 );
}