mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 13:05:38 +01:00
Zeroize return buf on failure in pkparse.c
This commit is contained in:
parent
beb42837ac
commit
ff13995812
@ -98,7 +98,10 @@ int pk_load_file( const char *path, unsigned char **buf, size_t *n )
|
||||
if( fread( *buf, 1, *n, f ) != *n )
|
||||
{
|
||||
fclose( f );
|
||||
|
||||
polarssl_zeroize( *buf, *n );
|
||||
polarssl_free( *buf );
|
||||
|
||||
return( POLARSSL_ERR_PK_FILE_IO_ERROR );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user