taskmgr: Fix a memory leak.

This commit is contained in:
Andrew Talbot 2007-10-20 16:24:56 +01:00 committed by Alexandre Julliard
parent 469669e629
commit e76fe016e4
1 changed files with 3 additions and 1 deletions

View File

@ -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