fix memory leak
authorDr. Stephen Henson <steve@openssl.org>
Tue, 11 Sep 2012 13:43:57 +0000 (13:43 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 11 Sep 2012 13:43:57 +0000 (13:43 +0000)
apps/s_server.c

index b487da3..77b34cb 100644 (file)
@@ -2102,6 +2102,12 @@ end:
                OPENSSL_free(dpass);
        free_sessions();
 #ifndef OPENSSL_NO_TLSEXT
                OPENSSL_free(dpass);
        free_sessions();
 #ifndef OPENSSL_NO_TLSEXT
+       if (tlscstatp.host)
+               OPENSSL_free(tlscstatp.host);
+       if (tlscstatp.port)
+               OPENSSL_free(tlscstatp.port);
+       if (tlscstatp.path)
+               OPENSSL_free(tlscstatp.path);
        if (ctx2 != NULL) SSL_CTX_free(ctx2);
        if (s_cert2)
                X509_free(s_cert2);
        if (ctx2 != NULL) SSL_CTX_free(ctx2);
        if (s_cert2)
                X509_free(s_cert2);