1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Merge remote-tracking branch 'upstream-restricted/pr/369' into development-restricted

This commit is contained in:
Gilles Peskine
2017-11-28 14:16:47 +01:00
11 changed files with 82 additions and 34 deletions

View File

@ -101,7 +101,10 @@ int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n )
if( fread( *buf, 1, *n, f ) != *n )
{
fclose( f );
mbedtls_zeroize( *buf, *n );
mbedtls_free( *buf );
return( MBEDTLS_ERR_PK_FILE_IO_ERROR );
}