Commit cacd1c44 authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

qmgr/tests: Fix minor potential memory leaks.

parent a73ab629
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment