Commit f1517b15 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ieframe: Moved freeing travellog entry into a helper function.

parent 00226935
...@@ -333,6 +333,11 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l ...@@ -333,6 +333,11 @@ static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return DefWindowProcW(hwnd, msg, wParam, lParam); 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) static void update_travellog(DocHost *This)
{ {
travellog_entry_t *new_entry; travellog_entry_t *new_entry;
...@@ -357,7 +362,7 @@ static void update_travellog(DocHost *This) ...@@ -357,7 +362,7 @@ static void update_travellog(DocHost *This)
} }
while(This->travellog.length > This->travellog.position) 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; new_entry = This->travellog.log + This->travellog.position;
...@@ -1013,7 +1018,7 @@ void DocHost_Release(DocHost *This) ...@@ -1013,7 +1018,7 @@ void DocHost_Release(DocHost *This)
ConnectionPointContainer_Destroy(&This->cps); ConnectionPointContainer_Destroy(&This->cps);
while(This->travellog.length) 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->travellog.log);
heap_free(This->url); heap_free(This->url);
......
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