From d65758db2826e3eac3e5e78281dbc59d535a8ba8 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 3 Aug 2011 12:35:47 +0200 Subject: [PATCH] mshtml: Use task destructor for start_request task. --- dlls/mshtml/navigate.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index ee6fd936df2..b42b3727e85 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -1224,7 +1224,14 @@ static void stop_request_proc(task_t *_task) list_remove(&task->bsc->bsc.entry); list_init(&task->bsc->bsc.entry); on_stop_nsrequest(task->bsc, S_OK); +} + +static void stop_request_task_destr(task_t *_task) +{ + stop_request_task_t *task = (stop_request_task_t*)_task; + IBindStatusCallback_Release(&task->bsc->bsc.IBindStatusCallback_iface); + heap_free(task); } static HRESULT async_stop_request(nsChannelBSC *This) @@ -1242,7 +1249,7 @@ static HRESULT async_stop_request(nsChannelBSC *This) IBindStatusCallback_AddRef(&This->bsc.IBindStatusCallback_iface); task->bsc = This; - push_task(&task->header, stop_request_proc, NULL, This->bsc.doc->basedoc.doc_obj->basedoc.task_magic); + push_task(&task->header, stop_request_proc, stop_request_task_destr, This->bsc.doc->basedoc.doc_obj->basedoc.task_magic); return S_OK; }