Skip to content

Commit

Permalink
Silence some code analysis warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Aug 23, 2019
1 parent fca8ec7 commit f7493c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packetWin7/Dll/Packet32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,15 @@ HMODULE LoadLibrarySafe(LPCTSTR lpFileName)
{
TRACE_ENTER();

TCHAR path[MAX_PATH];
TCHAR path[MAX_PATH] = { 0 };
TCHAR fullFileName[MAX_PATH];
UINT res;
HMODULE hModule = NULL;
do
{
res = GetSystemDirectory(path, MAX_PATH);

if (res == 0 || !path)
if (res == 0)
{
//
// some bad failure occurred;
Expand Down Expand Up @@ -501,7 +501,8 @@ BOOL NpcapCreatePipe(char *pipeName, HANDLE moduleName)
else
{
TRACE_EXIT();
CloseHandle(shExInfo.hProcess);
if (shExInfo.hProcess)
CloseHandle(shExInfo.hProcess);
return TRUE;
}
}
Expand Down

0 comments on commit f7493c6

Please sign in to comment.