]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
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 5eea4356d70348b102ba2b62d9a3196e21bc7690..90663e01a56e0d4544b944da2fd81e5052a05a2f 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