[WHOAMI] Better error message when we're unable to find the logon SID

svn path=/trunk/; revision=65865
This commit is contained in:
Hervé Poussineau 2014-12-28 22:15:08 +00:00
parent a371a9b498
commit 3ce44c57db

View file

@ -386,7 +386,13 @@ int WhoamiLogonId(void)
}
}
if (pSid == 0 || !ConvertSidToStringSidW(pSid, &pSidStr))
if (pSid == 0)
{
WhoamiFree(pGroupInfo);
wprintf(L"ERROR: Couldn't find the logon SID.\n");
return 1;
}
if (!ConvertSidToStringSidW(pSid, &pSidStr))
{
WhoamiFree(pGroupInfo);
wprintf(L"ERROR: Couldn't convert the logon SID to a string.\n");