Rm of memset instead of x509_crt_init()
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 66f26c7..c19536b 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -83,7 +83,7 @@
if( ( dst->peer_cert = polarssl_malloc( sizeof(x509_crt) ) ) == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
- memset( dst->peer_cert, 0, sizeof(x509_crt) );
+ x509_crt_init( dst->peer_cert );
if( ( ret = x509_crt_parse( dst->peer_cert, src->peer_cert->raw.p,
src->peer_cert->raw.len ) != 0 ) )
@@ -2494,7 +2494,7 @@
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
}
- memset( ssl->session_negotiate->peer_cert, 0, sizeof( x509_crt ) );
+ x509_crt_init( ssl->session_negotiate->peer_cert );
i = 7;