Author: pschweitzer Date: Thu Dec 29 13:20:18 2011 New Revision: 54778
URL: http://svn.reactos.org/svn/reactos?rev=54778&view=rev Log: [SYSDM] Fix memory leak
Modified: trunk/reactos/dll/cpl/sysdm/hardprof.c
Modified: trunk/reactos/dll/cpl/sysdm/hardprof.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/hardprof.c?re... ============================================================================== --- trunk/reactos/dll/cpl/sysdm/hardprof.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/sysdm/hardprof.c [iso-8859-1] Thu Dec 29 13:20:18 2011 @@ -207,7 +207,10 @@ return FALSE;
if (!GetProfileCount(&pProfileData->dwProfileCount)) - return FALSE; + { + HeapFree(pProfileData, 0, GetProcessHeap()); + return FALSE; + }
pProfileData->pProfiles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pProfileData->dwProfileCount * sizeof(PROFILE));