* LocalFree should only be executed if AllocAndLoadString() succeeds. Spotted by Thomas Faber.

svn path=/trunk/; revision=65137
This commit is contained in:
Amine Khaldi
2014-10-31 10:24:48 +00:00
parent 55f7571996
commit 7de7c827be
+4 -3
View File
@@ -89,9 +89,10 @@ BOOL ParseCommandLine(int argc, TCHAR *argv[])
}
default:
//Invalid parameter detected
if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM))
_putts(lpIllegalMsg);
LocalFree(lpIllegalMsg);
if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM)) {
_putts(lpIllegalMsg);
LocalFree(lpIllegalMsg);
}
return FALSE;
}
}