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;
/*
* Make sure memory references are valid.
* Make sure memory references are valid in case we exit early.
*/
server_fd = 0;
memset( &ssl, 0, sizeof( ssl_context ) );
x509_crt_init( &cacert );
x509_crt_init( &clicert );
pk_init( &pkey );

View file

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