commit | c9d6226d2c7b7a99be6694c6014e4e4be1cc69d7 | [log] [tgz] |
---|---|---|
author | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Tue Dec 12 20:15:03 2017 +0000 |
committer | Andres Amaya Garcia <andres.amayagarcia@arm.com> | Tue Jan 23 19:37:44 2018 +0000 |
tree | 20ebb476470a09be9662c7f06847c2de275771c0 | |
parent | cb5123fa86982c75f2c8061b58ac51c9e9938fdb [diff] |
Change formatting of allocation check in x509_crl
diff --git a/library/x509_crl.c b/library/x509_crl.c index 9422457..0bb7236 100644 --- a/library/x509_crl.c +++ b/library/x509_crl.c
@@ -296,7 +296,9 @@ */ if( buflen == 0 ) return( MBEDTLS_ERR_X509_INVALID_FORMAT ); - else if( ( p = mbedtls_calloc( 1, buflen ) ) == NULL ) + + p = mbedtls_calloc( 1, buflen ); + if( p == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); memcpy( p, buf, buflen );