mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[TASKMGR] Fix PerfDataDeallocCommandLineCache
Do not leak memory. CORE-18014
This commit is contained in:
parent
7989e3f26c
commit
9a6c85f68a
1 changed files with 6 additions and 7 deletions
|
@ -649,16 +649,15 @@ cleanup:
|
|||
|
||||
void PerfDataDeallocCommandLineCache()
|
||||
{
|
||||
PCMD_LINE_CACHE cache = global_cache;
|
||||
PCMD_LINE_CACHE cache_old;
|
||||
PCMD_LINE_CACHE cache, pnext;
|
||||
|
||||
while (cache && cache->pnext != NULL)
|
||||
for (cache = global_cache; cache; cache = pnext)
|
||||
{
|
||||
cache_old = cache;
|
||||
cache = cache->pnext;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, cache_old);
|
||||
pnext = cache->pnext;
|
||||
HeapFree(GetProcessHeap(), 0, cache);
|
||||
}
|
||||
|
||||
global_cache = NULL;
|
||||
}
|
||||
|
||||
ULONG PerfDataGetSessionId(ULONG Index)
|
||||
|
|
Loading…
Reference in a new issue