From f1517b15719e489d5d35d01e68c1cfc18787c86b Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 2 Apr 2013 17:39:34 +0200 Subject: [PATCH] ieframe: Moved freeing travellog entry into a helper function. --- dlls/ieframe/dochost.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/ieframe/dochost.c b/dlls/ieframe/dochost.c index 07881324875..e1a897abf65 100644 --- a/dlls/ieframe/dochost.c +++ b/dlls/ieframe/dochost.c @@ -333,6 +333,11 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l return DefWindowProcW(hwnd, msg, wParam, lParam); } +static void free_travellog_entry(travellog_entry_t *entry) +{ + heap_free(entry->url); +} + static void update_travellog(DocHost *This) { travellog_entry_t *new_entry; @@ -357,7 +362,7 @@ static void update_travellog(DocHost *This) } while(This->travellog.length > This->travellog.position) - heap_free(This->travellog.log[--This->travellog.length].url); + free_travellog_entry(This->travellog.log + --This->travellog.length); } new_entry = This->travellog.log + This->travellog.position; @@ -1013,7 +1018,7 @@ void DocHost_Release(DocHost *This) ConnectionPointContainer_Destroy(&This->cps); while(This->travellog.length) - heap_free(This->travellog.log[--This->travellog.length].url); + free_travellog_entry(This->travellog.log + --This->travellog.length); heap_free(This->travellog.log); heap_free(This->url); -- 2.11.4.GIT