Commit 5150e0f0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Properly free tasks in remove_target_tasks.

parent 923484bd
...@@ -116,15 +116,16 @@ void remove_target_tasks(LONG target) ...@@ -116,15 +116,16 @@ void remove_target_tasks(LONG target)
SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time - GetTickCount(), NULL); SetTimer(thread_data->thread_hwnd, TIMER_ID, timer->time - GetTickCount(), NULL);
} }
while(thread_data->task_queue_head while(thread_data->task_queue_head && thread_data->task_queue_head->target_magic == target) {
&& thread_data->task_queue_head->target_magic == target) iter = pop_task();
pop_task(); iter->destr(iter);
}
for(iter = thread_data->task_queue_head; iter; iter = iter->next) { for(iter = thread_data->task_queue_head; iter; iter = iter->next) {
while(iter->next && iter->next->target_magic == target) { while(iter->next && iter->next->target_magic == target) {
tmp = iter->next; tmp = iter->next;
iter->next = tmp->next; iter->next = tmp->next;
heap_free(tmp); tmp->destr(tmp);
} }
if(!iter->next) if(!iter->next)
......
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