Close token handle in GetProcessTokenGroups()

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/162/head
Selva Nair 8 years ago
parent 06b2170f02
commit c3e4247e30

@ -324,7 +324,7 @@ GetProcessTokenGroups(void)
if (!groups)
{
PrintDebug(L"GetProcessTokenGroups: error = %lu", GetLastError());
return NULL;
goto out;
}
if (!GetTokenInformation(token, TokenGroups, groups, buf_size, &buf_size))
{
@ -332,6 +332,9 @@ GetProcessTokenGroups(void)
free (groups);
groups = NULL;
}
out:
CloseHandle(token);
return groups;
}

Loading…
Cancel
Save