Add forgotten initializations

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-20 13:10:13 +02:00
parent eb1714e9c8
commit 3bd2aae5a5
2 changed files with 4 additions and 2 deletions

View File

@ -360,9 +360,10 @@ int main( int argc, char *argv[] )
const int *list; const int *list;
/* /*
* Make sure memory references are valid. * Make sure memory references are valid in case we exit early.
*/ */
server_fd = 0; server_fd = 0;
memset( &ssl, 0, sizeof( ssl_context ) );
x509_crt_init( &cacert ); x509_crt_init( &cacert );
x509_crt_init( &clicert ); x509_crt_init( &clicert );
pk_init( &pkey ); pk_init( &pkey );

View File

@ -233,9 +233,10 @@ int main( int argc, char *argv[] )
#endif #endif
/* /*
* Make sure memory references are valid. * Make sure memory references are valid in case we exit early.
*/ */
listen_fd = 0; listen_fd = 0;
memset( &ssl, 0, sizeof( ssl_context ) );
#if defined(POLARSSL_X509_CRT_PARSE_C) #if defined(POLARSSL_X509_CRT_PARSE_C)
x509_crt_init( &cacert ); x509_crt_init( &cacert );
x509_crt_init( &srvcert ); x509_crt_init( &srvcert );