No need to check for whether 'pBuffer' is NULL to call NetApiBufferFree, because:
- 'pBuffer' was used above this call without any particular checks;
- 'pBuffer' can be only null when NetUserEnum fails with an error different from NERR_Success or ERROR_MORE_DATA. But this case was actually checked for before using 'pBuffer'.
By Victor Martinez aka. Mr.Coverity ^^ :)
CID 1363629
CORE-11598 #resolve

svn path=/trunk/; revision=71929
This commit is contained in:
Hermès Bélusca-Maïto 2016-07-13 17:35:16 +00:00
parent 341b360aa5
commit 8889af9d21

View file

@ -70,11 +70,8 @@ EnumerateUsers(VOID)
PrintToConsole(L"%s\n", pBuffer[i].usri0_name);
}
if (pBuffer != NULL)
{
NetApiBufferFree(pBuffer);
pBuffer = NULL;
}
NetApiBufferFree(pBuffer);
pBuffer = NULL;
}
while (Status == ERROR_MORE_DATA);