summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-07-05 10:32:33 +0100
committerMatt Caswell <matt@openssl.org>2017-07-07 10:44:11 +0100
commit9561e2a169f499f8346ffdd7541bc4e3d81d6711 (patch)
tree13a0a2286761d965c0dc7512b497349561e3d127 /apps/s_server.c
parent4549ed12ec3337313c14815438fa9aee88bf1359 (diff)
Fix memory leak when using PSK session files
We were not freeing the session created when loading a PSK session file. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/3855)
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 13cc7a190a..8df767c992 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -2104,6 +2104,7 @@ int s_server_main(int argc, char *argv[])
ret = 0;
end:
SSL_CTX_free(ctx);
+ SSL_SESSION_free(psksess);
set_keylog_file(NULL, NULL);
X509_free(s_cert);
sk_X509_CRL_pop_free(crls, X509_CRL_free);