mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Apply the semantic patch rm-malloc-cast.cocci.
for dir in library programs; do spatch --sp-file scripts/rm-malloc-cast.cocci --dir $dir \ --in-place; done
This commit is contained in:
committed by
Manuel Pégourié-Gonnard
parent
fd9afb29d3
commit
c531b4af3c
@ -89,7 +89,7 @@ int pk_load_file( const char *path, unsigned char **buf, size_t *n )
|
||||
*n = (size_t) size;
|
||||
|
||||
if( *n + 1 == 0 ||
|
||||
( *buf = (unsigned char *) polarssl_malloc( *n + 1 ) ) == NULL )
|
||||
( *buf = polarssl_malloc( *n + 1 ) ) == NULL )
|
||||
{
|
||||
fclose( f );
|
||||
return( POLARSSL_ERR_PK_MALLOC_FAILED );
|
||||
|
Reference in New Issue
Block a user