taskmgr: Fix a memory leak
Andrew Talbot
andrew.talbot at talbotville.com
Sat Oct 20 10:24:56 CDT 2007
Changelog:
taskmgr: Fix a memory leak.
diff --git a/programs/taskmgr/perfdata.c b/programs/taskmgr/perfdata.c
index 85001b3..611990f 100644
--- a/programs/taskmgr/perfdata.c
+++ b/programs/taskmgr/perfdata.c
@@ -124,8 +124,10 @@ void PerfDataRefresh(void)
/* Get processor time information */
SysProcessorTimeInfo = (PSYSTEM_PROCESSORTIME_INFO)malloc(sizeof(SYSTEM_PROCESSORTIME_INFO) * SystemBasicInfo.bKeNumberProcessors);
status = NtQuerySystemInformation(SystemProcessorTimeInformation, SysProcessorTimeInfo, sizeof(SYSTEM_PROCESSORTIME_INFO) * SystemBasicInfo.bKeNumberProcessors, &ulSize);
- if (status != NO_ERROR)
+ if (status != NO_ERROR) {
+ free(SysProcessorTimeInfo);
return;
+ }
/* Get handle information
* We don't know how much data there is so just keep
More information about the wine-patches
mailing list