commit 5e0e6b15c4b2acf3a1e36a683d83a076e8a41764
parent 4507f419bd5417fcd400a3a268f816df480f6e48
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 28 Feb 2018 00:46:36 +0100
fix leak in test on error path
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c
@@ -132,7 +132,11 @@ test_query_session ()
const union MHD_DaemonInfo *dinfo;
dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT);
if (NULL == dinfo || 0 == dinfo->port)
- { MHD_stop_daemon (d); return 32; }
+ {
+ MHD_stop_daemon (d);
+ free (cbc.buf);
+ return 32;
+ }
port = (int)dinfo->port;
}