]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix some memory leaks in vgauth
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:02 +0000 (11:23 -0700)
open-vm-tools/vgauth/lib/impersonate.c
open-vm-tools/vgauth/serviceImpl/netPosix.c

index 924107c0dd05482129d620a3aaf929de4faa1f59..e07fd8c4569e8784e5f3ddba71a08bc6910252c4 100644 (file)
@@ -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));
    }
index a149c4aa4a344fea0f1d12ea7623704c6543205d..5efcf21aa9024d815763827909e2d85bbe6c7927 100644 (file)
@@ -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) {