Jacek Caban : mshtml: Properly free tasks in remove_target_tasks.

Alexandre Julliard julliard at winehq.org
Wed Aug 3 12:48:12 CDT 2011


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Aug  3 12:37:12 2011 +0200

mshtml: Properly free tasks in remove_target_tasks.

---

 dlls/mshtml/task.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c
index 136561c..a38437c 100644
--- a/dlls/mshtml/task.c
+++ b/dlls/mshtml/task.c
@@ -116,15 +116,16 @@ void remove_target_tasks(LONG target)
         SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time - GetTickCount(), NULL);
     }
 
-    while(thread_data->task_queue_head
-          && thread_data->task_queue_head->target_magic == target)
-        pop_task();
+    while(thread_data->task_queue_head && thread_data->task_queue_head->target_magic == target) {
+        iter = pop_task();
+        iter->destr(iter);
+    }
 
     for(iter = thread_data->task_queue_head; iter; iter = iter->next) {
         while(iter->next && iter->next->target_magic == target) {
             tmp = iter->next;
             iter->next = tmp->next;
-            heap_free(tmp);
+            tmp->destr(tmp);
         }
 
         if(!iter->next)




More information about the wine-cvs mailing list