Initialize pval.
[oweals/openssl.git] / apps / s_client.c
index 4eac4341c403c2812a64b1a0f3fedc7f7a7af5d3..251da63ed542873e1f8db2f792dd0c13cc816de0 100644 (file)
@@ -348,7 +348,7 @@ int MAIN(int, char **);
 int MAIN(int argc, char **argv)
        {
        int off=0;
-       SSL *con=NULL,*con2=NULL;
+       SSL *con=NULL;
        X509_STORE *store = NULL;
        int s,k,width,state=0;
        char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL;
@@ -1237,9 +1237,12 @@ shut:
        SHUTDOWN(SSL_get_fd(con));
        ret=0;
 end:
-       if(prexit) print_stuff(bio_c_out,con,1);
-       if (con != NULL) SSL_free(con);
-       if (con2 != NULL) SSL_free(con2);
+       if (con != NULL)
+               {
+               if (prexit != 0)
+                       print_stuff(bio_c_out,con,1);
+               SSL_free(con);
+               }
        if (ctx != NULL) SSL_CTX_free(ctx);
        if (cert)
                X509_free(cert);