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 45eea960b878241a0e9c191553bd534c9faf5091..b487da357851165fc3c6cdbc238f3035400c471d 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)