Skip to content

Commit

Permalink
lguest: fix switcher_page leak on unload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Weiner authored and rustyrussell committed Jul 28, 2008
1 parent 0c12091 commit 0a70721
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/lguest/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a70721

Please sign in to comment.