[2/2] qmgr/tests: Fix minor potential memory leaks in job.c.

Dan Hipschman dsh at linux.ucla.edu
Tue Apr 15 13:09:19 CDT 2008


---
 dlls/qmgr/tests/job.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

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;
     }
 



More information about the wine-patches mailing list