lguest: fix switcher_page leak on unload
authorJohannes Weiner <hannes@saeurebad.de>
Tue, 8 Jul 2008 08:29:42 +0000 (10:29 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 28 Jul 2008 23:58:32 +0000 (09:58 +1000)
map_switcher allocates the array, unmap_switcher has to free it
accordingly.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/lguest/core.c

index 5eea435..90663e0 100644 (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