Author: hbelusca
Date: Wed Jul 13 17:35:16 2016
New Revision: 71929
URL:
http://svn.reactos.org/svn/reactos?rev=71929&view=rev
Log:
[NET]
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
Modified:
trunk/reactos/base/applications/network/net/cmdUser.c
Modified: trunk/reactos/base/applications/network/net/cmdUser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdUser.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdUser.c [iso-8859-1] Wed Jul 13 17:35:16
2016
@@ -70,11 +70,8 @@
PrintToConsole(L"%s\n", pBuffer[i].usri0_name);
}
- if (pBuffer != NULL)
- {
- NetApiBufferFree(pBuffer);
- pBuffer = NULL;
- }
+ NetApiBufferFree(pBuffer);
+ pBuffer = NULL;
}
while (Status == ERROR_MORE_DATA);