Author: janderwald
Date: Thu Oct 30 03:28:50 2008
New Revision: 37083
URL:
http://svn.reactos.org/svn/reactos?rev=37083&view=rev
Log:
- Fix memory leak (CID 621)
Modified:
trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c
Modified: trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
==============================================================================
--- trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/mscutils/eventvwr/eventvwr.c [iso-8859-1] Thu Oct 30
03:28:50 2008
@@ -296,6 +296,10 @@
// Allocate space for parameters
szArguments = (LPTSTR*)malloc(sizeof(LPVOID)* pevlr->NumStrings);
+ if (!szArguments)
+ {
+ return FALSE;
+ }
for (i = 0; i < pevlr->NumStrings ; i++)
{
@@ -371,6 +375,8 @@
LoadString(hInst, IDC_EVENTSTRINGIDNOTFOUND, szStringIDNotFound, MAX_LOADSTRING);
wsprintf (EventText, szStringIDNotFound , (DWORD)(pevlr->EventID & 0xFFFF) ,
SourceName );
}
+
+ free(szArguments);
// No more dlls to try , return result
return bDone;