* grp.cc (getgroups32): Protect against closing cygheap->user.token.

This commit is contained in:
Christopher Faylor
2002-11-16 03:50:56 +00:00
parent a87878a965
commit 463e739282
2 changed files with 6 additions and 1 deletions

View File

@@ -372,7 +372,8 @@ getgroups32 (int gidsetsize, __gid32_t *grouplist, __gid32_t gid,
++cnt;
if (gidsetsize && cnt > gidsetsize)
{
CloseHandle (hToken);
if (hToken != cygheap->user.token)
CloseHandle (hToken);
goto error;
}
break;