lguest: fix switcher_page leak on unload
PATCH 1/1 lguest: fix switcher_page leak on unload
map_switcher allocates the array, unmap_switcher has to free it accordingly.
Signed-off-by Johannes Weiner <[email protected]>
---
drivers/lguest/core.c +1 -0
@@ -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
Rusty Russell
AppliedQuoted 2 lines · On Tuesday 08 July 2008 18:29:42 Johannes Weiner wrote:
map_switcherallocates the array,unmap_switcherhas to free it accordingly.
Applied, thanks Johannes! A small mem leak on module remove probably isn't worth sending for -rc9, but queued for next merge.
Cheers,
Rusty.