public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lguest: fix switcher_page leak on unload
@ 2008-07-08  8:29 Johannes Weiner
  2008-07-08  9:31 ` Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Weiner @ 2008-07-08  8:29 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel

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

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-08  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08  8:29 [PATCH] lguest: fix switcher_page leak on unload Johannes Weiner
2008-07-08  9:31 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox