Fix whitespace of 369e6c20.

This commit is contained in:
Mansour Moufid 2015-02-15 17:46:32 -05:00
parent 369e6c20b3
commit bd1d44e251
4 changed files with 7 additions and 14 deletions

View file

@ -269,8 +269,7 @@ int asn1_get_sequence_of( unsigned char **p,
/* Allocate and assign next pointer */ /* Allocate and assign next pointer */
if( *p < end ) if( *p < end )
{ {
cur->next = polarssl_malloc( cur->next = polarssl_malloc( sizeof( asn1_sequence ) );
sizeof( asn1_sequence ) );
if( cur->next == NULL ) if( cur->next == NULL )
return( POLARSSL_ERR_ASN1_MALLOC_FAILED ); return( POLARSSL_ERR_ASN1_MALLOC_FAILED );

View file

@ -258,8 +258,7 @@ int ssl_cache_set( void *data, const ssl_session *session )
*/ */
if( session->peer_cert != NULL ) if( session->peer_cert != NULL )
{ {
cur->peer_cert.p = polarssl_malloc( cur->peer_cert.p = polarssl_malloc( session->peer_cert->raw.len );
session->peer_cert->raw.len );
if( cur->peer_cert.p == NULL ) if( cur->peer_cert.p == NULL )
{ {
ret = 1; ret = 1;

View file

@ -3544,20 +3544,17 @@ static int ssl_handshake_init( ssl_context *ssl )
*/ */
if( ssl->transform_negotiate == NULL ) if( ssl->transform_negotiate == NULL )
{ {
ssl->transform_negotiate = polarssl_malloc( ssl->transform_negotiate = polarssl_malloc( sizeof(ssl_transform) );
sizeof(ssl_transform) );
} }
if( ssl->session_negotiate == NULL ) if( ssl->session_negotiate == NULL )
{ {
ssl->session_negotiate = polarssl_malloc( ssl->session_negotiate = polarssl_malloc( sizeof(ssl_session) );
sizeof(ssl_session) );
} }
if( ssl->handshake == NULL ) if( ssl->handshake == NULL )
{ {
ssl->handshake = ssl->handshake = polarssl_malloc( sizeof(ssl_handshake_params) );
polarssl_malloc( sizeof(ssl_handshake_params) );
} }
/* All pointers should exist and can be directly freed without issue */ /* All pointers should exist and can be directly freed without issue */
@ -4064,8 +4061,7 @@ int ssl_set_psk( ssl_context *ssl, const unsigned char *psk, size_t psk_len,
ssl->psk_identity_len = psk_identity_len; ssl->psk_identity_len = psk_identity_len;
ssl->psk = polarssl_malloc( ssl->psk_len ); ssl->psk = polarssl_malloc( ssl->psk_len );
ssl->psk_identity = ssl->psk_identity = polarssl_malloc( ssl->psk_identity_len );
polarssl_malloc( ssl->psk_identity_len );
if( ssl->psk == NULL || ssl->psk_identity == NULL ) if( ssl->psk == NULL || ssl->psk_identity == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED ); return( POLARSSL_ERR_SSL_MALLOC_FAILED );

View file

@ -356,8 +356,7 @@ static int x509_get_subject_alt_name( unsigned char **p,
if( cur->next != NULL ) if( cur->next != NULL )
return( POLARSSL_ERR_X509_INVALID_EXTENSIONS ); return( POLARSSL_ERR_X509_INVALID_EXTENSIONS );
cur->next = polarssl_malloc( cur->next = polarssl_malloc( sizeof( asn1_sequence ) );
sizeof( asn1_sequence ) );
if( cur->next == NULL ) if( cur->next == NULL )
return( POLARSSL_ERR_X509_INVALID_EXTENSIONS + return( POLARSSL_ERR_X509_INVALID_EXTENSIONS +