]> granicus.if.org Git - openssl/commitdiff
fix memory leak
authorDr. Stephen Henson <steve@openssl.org>
Tue, 11 Sep 2012 13:44:19 +0000 (13:44 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 11 Sep 2012 13:44:19 +0000 (13:44 +0000)
apps/s_server.c

index 9692c70b2de5c4900d21dbc3633628279695eeb5..0d493295efd3ba844c0d041a37004eff828020d3 100644 (file)
@@ -1958,11 +1958,21 @@ end:
                EVP_PKEY_free(s_key);
        if (s_dkey)
                EVP_PKEY_free(s_dkey);
+       if (s_chain)
+               sk_X509_pop_free(s_chain, X509_free);
+       if (s_dchain)
+               sk_X509_pop_free(s_dchain, X509_free);
        if (pass)
                OPENSSL_free(pass);
        if (dpass)
                OPENSSL_free(dpass);
 #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);