From: Johannes Weiner Date: Tue, 8 Jul 2008 08:29:42 +0000 (+0200) Subject: lguest: fix switcher_page leak on unload X-Git-Tag: v2.6.27-rc1~1^2~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a707210aa1b8ac40fe781b2a9d0b203b6ebb921;p=linux-2.6 lguest: fix switcher_page leak on unload map_switcher allocates the array, unmap_switcher has to free it accordingly. Signed-off-by: Johannes Weiner Signed-off-by: Rusty Russell --- diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 5eea4356d7..90663e01a5 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c @@ -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