Module: wine Branch: master Commit: cacd1c448e633852c77bfa87572aa12895d7e86a URL: http://source.winehq.org/git/wine.git/?a=commit;h=cacd1c448e633852c77bfa8757...
Author: Dan Hipschman dsh@linux.ucla.edu Date: Tue Apr 15 11:08:48 2008 -0700
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(+), 0 deletions(-)
diff --git a/dlls/qmgr/tests/enum_jobs.c b/dlls/qmgr/tests/enum_jobs.c index 2b73631..f95404c 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 52d4e82..36201f8 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; }