mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Remove a few redundant memset after calloc.
Using the following semantic patch provided by Mansour Moufid: @@ expression x; @@ x = mbedtls_calloc(...) ... - memset(x, 0, ...);
This commit is contained in:
@ -316,8 +316,6 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data
|
||||
if( ( cur = mbedtls_calloc( 1, sizeof(mbedtls_asn1_named_data) ) ) == NULL )
|
||||
return( NULL );
|
||||
|
||||
memset( cur, 0, sizeof(mbedtls_asn1_named_data) );
|
||||
|
||||
cur->oid.len = oid_len;
|
||||
cur->oid.p = mbedtls_calloc( 1, oid_len );
|
||||
if( cur->oid.p == NULL )
|
||||
|
Reference in New Issue
Block a user