From: Oliver Kurth Date: Thu, 30 Nov 2017 23:38:03 +0000 (-0800) Subject: Fix memory leak in vmtoolsd. X-Git-Tag: stable-10.3.0~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=595f5add83e8fbf1ffcabd7537d294c1c9c4edfe;p=thirdparty%2Fopen-vm-tools.git Fix memory leak in vmtoolsd. --- diff --git a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c index 7e8d9f47b..fe55037a0 100644 --- a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c +++ b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c @@ -356,6 +356,8 @@ GuestInfoSetConfigList(ToolsAppCtx *ctx, *pList = list; return TRUE; + } else { + g_free(listString); } return FALSE; } diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 2c3e023de..ada04183b 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -6480,6 +6480,10 @@ abort: } VixToolsLogoutUser(userToken); + if (NULL != regex) { + g_regex_unref(regex); + } + if (NULL == fileList) { fileList = Util_SafeStrdup(""); }