From 53a92421b1d0b206eedb49b4689dbf6943029106 Mon Sep 17 00:00:00 2001 From: kubistika Date: Wed, 11 Sep 2019 14:14:43 +0300 Subject: [PATCH] server: proxy: config: fix mem leak --- server/proxy/pf_config.c | 3 ++- server/proxy/pf_server.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/proxy/pf_config.c b/server/proxy/pf_config.c index dd8af9b..8ccd48f 100644 --- a/server/proxy/pf_config.c +++ b/server/proxy/pf_config.c @@ -125,7 +125,7 @@ static BOOL pf_config_load_modules(wIniFile* ini, proxyConfig* config) { UINT32 index; int modules_count = 0; - char** module_names; + char** module_names = NULL; module_names = IniFile_GetSectionKeyNames(ini, "Modules", &modules_count); @@ -143,6 +143,7 @@ static BOOL pf_config_load_modules(wIniFile* ini, proxyConfig* config) WLog_INFO(TAG, "module '%s' is loaded!", module_name); } + free(module_names); return TRUE; } diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index fdfe3b9..ed36bcd 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -419,6 +419,7 @@ int pf_server_start(proxyConfig* config) pf_server_mainloop(listener); } + freerdp_listener_free(listener); WSACleanup(); return 0; } -- 2.7.4