mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
qmgr/tests: Fix minor potential memory leaks.
This commit is contained in:
parent
a73ab629e9
commit
cacd1c448e
@ -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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user