mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Cleaned up location of init and free for some programs to prevent memory
leaks on incorrect arguments
This commit is contained in:
parent
cbe3d0d5cc
commit
0c22610693
19 changed files with 95 additions and 48 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue