[1/2] qmgr/tests: Fix minor potential memory leaks in enum_jobs.c.
Dan Hipschman
dsh at linux.ucla.edu
Tue Apr 15 13:08:48 CDT 2008
These two patches just fix some minor potential memory leaks in the qmgr
tests that I noticed while looking at the Smatch results.
---
dlls/qmgr/tests/enum_jobs.c | 3 +++
1 files changed, 3 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 */
More information about the wine-patches
mailing list