summaryrefslogtreecommitdiffstats
path: root/apps/s_client.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-07-03 16:37:31 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-07-03 16:37:31 +0000
commitf142a71c3da0f4a4bd42e9dd6736176bab2358d9 (patch)
tree7c654b5b91f53afb5db382f946bdcc82e222d3ad /apps/s_client.c
parent5b7af6de43cf5504759516a72510319fb03d502b (diff)
Fix memory leak.
Always perform nexproto callback argument initialisation in s_server otherwise we use uninitialised data if -nocert is specified.
Diffstat (limited to 'apps/s_client.c')
-rw-r--r--apps/s_client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index 2b2b740778..e64aaf66c6 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -1910,6 +1910,10 @@ end:
print_stuff(bio_c_out,con,1);
SSL_free(con);
}
+#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+ if (next_proto.data)
+ OPENSSL_free(next_proto.data);
+#endif
if (ctx != NULL) SSL_CTX_free(ctx);
if (cert)
X509_free(cert);