From 324daff6b40e3caa8e058889bd212dcc1e5d4255 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 29 Dec 2011 13:20:18 +0000 Subject: [PATCH] [SYSDM] Fix memory leak svn path=/trunk/; revision=54778 --- reactos/dll/cpl/sysdm/hardprof.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/dll/cpl/sysdm/hardprof.c b/reactos/dll/cpl/sysdm/hardprof.c index dec9b53c21d..98876fe72da 100644 --- a/reactos/dll/cpl/sysdm/hardprof.c +++ b/reactos/dll/cpl/sysdm/hardprof.c @@ -207,7 +207,10 @@ GetProfiles(HWND hwndDlg) return FALSE; if (!GetProfileCount(&pProfileData->dwProfileCount)) + { + HeapFree(pProfileData, 0, GetProcessHeap()); return FALSE; + } pProfileData->pProfiles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pProfileData->dwProfileCount * sizeof(PROFILE));