fix memory leak
authorDr. Stephen Henson <steve@openssl.org>
Sun, 9 Sep 2012 21:19:32 +0000 (21:19 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 9 Sep 2012 21:19:32 +0000 (21:19 +0000)
apps/s_server.c

index 45eea96..b487da3 100644 (file)
@@ -2092,6 +2092,10 @@ 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)