Rob Shearman : qmgr: Fix a memory leak.

Alexandre Julliard julliard at winehq.org
Mon Mar 9 09:40:24 CDT 2009


Module: wine
Branch: master
Commit: c376b1bfc08109a8635f65eab66e64c274b8b306
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c376b1bfc08109a8635f65eab66e64c274b8b306

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Sat Mar  7 21:56:00 2009 +0000

qmgr: Fix a memory leak.

---

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

diff --git a/dlls/qmgr/qmgr.c b/dlls/qmgr/qmgr.c
index 5fdd121..1ff6050 100644
--- a/dlls/qmgr/qmgr.c
+++ b/dlls/qmgr/qmgr.c
@@ -157,7 +157,14 @@ DWORD WINAPI fileTransfer(void *param)
 
         /* Check if it's the stop_event */
         if (WaitForMultipleObjects(2, events, FALSE, INFINITE) == WAIT_OBJECT_0)
+        {
+            LIST_FOR_EACH_ENTRY_SAFE(job, jobCur, &qmgr->jobs, BackgroundCopyJobImpl, entryFromQmgr)
+            {
+                list_remove(&job->entryFromQmgr);
+                IBackgroundCopyJob_Release((IBackgroundCopyJob *) job);
+            }
             return 0;
+        }
 
         /* Note that other threads may add files to the job list, but only
            this thread ever deletes them so we don't need to worry about jobs




More information about the wine-cvs mailing list