lguest: fix switcher_page leak on unload

map_switcher allocates the array, unmap_switcher has to free it
accordingly.

Signed-off-by: Johannes Weiner <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
This commit is contained in:
Johannes Weiner 2008-07-08 10:29:42 +02:00 • committed by Rusty Russell
commit 0a707210aa

View file

@ -135,6 +135,7 @@ static void unmap_switcher(void)
/* Now we just need to free the pages we copied the switcher into */
for (i = 0; i < TOTAL_SWITCHER_PAGES; i++)
__free_pages(switcher_page[i], 0);
kfree(switcher_page);
}
/*H:032