From cacd1c448e633852c77bfa87572aa12895d7e86a Mon Sep 17 00:00:00 2001 From: Dan Hipschman Date: Tue, 15 Apr 2008 11:08:48 -0700 Subject: [PATCH] qmgr/tests: Fix minor potential memory leaks. --- dlls/qmgr/tests/enum_jobs.c | 3 +++ dlls/qmgr/tests/job.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/dlls/qmgr/tests/enum_jobs.c b/dlls/qmgr/tests/enum_jobs.c index 2b7363155e..f95404c041 100644 --- a/dlls/qmgr/tests/enum_jobs.c +++ b/dlls/qmgr/tests/enum_jobs.c @@ -209,6 +209,7 @@ static void test_Next_walkList_2(void) if(hres != S_OK) { skip("Unable to get file from test_enumJobs\n"); + HeapFree(GetProcessHeap(), 0, jobs); return; } ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08x\n", hres); @@ -219,6 +220,8 @@ static void test_Next_walkList_2(void) if (jobs[i]) IBackgroundCopyFile_Release(jobs[i]); } + + HeapFree(GetProcessHeap(), 0, jobs); } /* Test Next Error conditions */ diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c index 52d4e8296d..36201f8194 100644 --- a/dlls/qmgr/tests/job.c +++ b/dlls/qmgr/tests/job.c @@ -416,6 +416,8 @@ static void test_CompleteLocalURL(void) if (!urlA || !urlB) { skip("Unable to allocate memory for URLs\n"); + HeapFree(GetProcessHeap(), 0, urlA); + HeapFree(GetProcessHeap(), 0, urlB); return; } @@ -428,6 +430,8 @@ static void test_CompleteLocalURL(void) if (hres != S_OK) { skip("Unable to add file to job\n"); + HeapFree(GetProcessHeap(), 0, urlA); + HeapFree(GetProcessHeap(), 0, urlB); return; } @@ -435,6 +439,8 @@ static void test_CompleteLocalURL(void) if (hres != S_OK) { skip("Unable to add file to job\n"); + HeapFree(GetProcessHeap(), 0, urlA); + HeapFree(GetProcessHeap(), 0, urlB); return; }