From: Johannes Weiner Date: Tue, 8 Jul 2008 08:29:42 +0000 (+0200) Subject: lguest: fix switcher_page leak on unload X-Git-Tag: upstream/snapshot3+hdmi~23284^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a707210aa1b8ac40fe781b2a9d0b203b6ebb921;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 5eea435..90663e0 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