ieframe: Moved freeing travellog entry into a helper function.

This commit is contained in:
Jacek Caban 2013-04-02 17:39:34 +02:00 committed by Alexandre Julliard
parent 00226935c7
commit f1517b1571
1 changed files with 7 additions and 2 deletions

View File

@ -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)
} }
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)
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);