Commit f2d61379 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds
Browse files

[PATCH] swsusp: prevent possible memory leak

Prevent swsusp from leaking some memory in case of an error in
read_pagedir().  It also prevents the BUG_ON() from triggering if there's
an error while reading swap.
Signed-off-by: default avatarRafael J. Wysocki <>
Acked-by: default avatarPavel Machek <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 254b5477
......@@ -1437,9 +1437,9 @@ static int read_pagedir(struct pbe *pblist)
if (error)
free_page((unsigned long)pblist);
BUG_ON(i != swsusp_info.pagedir_pages);
BUG_ON(i != swsusp_info.pagedir_pages);
return error;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment