From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:02 +0000 (-0700) Subject: Fix some memory leaks in vgauth X-Git-Tag: stable-10.2.0~550 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19fe2c9f63be291c7ab215e244c93ea179e48cde;p=thirdparty%2Fopen-vm-tools.git Fix some memory leaks in vgauth --- diff --git a/open-vm-tools/vgauth/lib/impersonate.c b/open-vm-tools/vgauth/lib/impersonate.c index 924107c0d..e07fd8c45 100644 --- a/open-vm-tools/vgauth/lib/impersonate.c +++ b/open-vm-tools/vgauth/lib/impersonate.c @@ -296,7 +296,8 @@ VGAuth_UserHandleFree(VGAuthUserHandle *handle) g_free(handle->userName); - if (handle->details.type == VGAUTH_AUTH_TYPE_SAML) { + if (handle->details.type == VGAUTH_AUTH_TYPE_SAML || + handle->details.type == VGAUTH_AUTH_TYPE_SAML_INFO_ONLY) { g_free(handle->details.val.samlData.subject); VGAuth_FreeAliasInfoContents(&(handle->details.val.samlData.aliasInfo)); } diff --git a/open-vm-tools/vgauth/serviceImpl/netPosix.c b/open-vm-tools/vgauth/serviceImpl/netPosix.c index a149c4aa4..5efcf21aa 100644 --- a/open-vm-tools/vgauth/serviceImpl/netPosix.c +++ b/open-vm-tools/vgauth/serviceImpl/netPosix.c @@ -113,6 +113,8 @@ ServiceNetworkListen(ServiceConnection *conn, // IN/OUT } Log("%s: Created socket directory '%s'\n", __FUNCTION__, socketDir); } + g_free(socketDir); + socketDir = NULL; sock = socket(PF_UNIX, SOCK_STREAM, 0); if (sock < 0) {