]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / Hibernate: Do not leak memory in error/test code paths
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 22 Nov 2011 22:08:10 +0000 (23:08 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Tue, 22 Nov 2011 22:08:10 +0000 (23:08 +0100)
commit3e8a3efcbdcd9ce499bba3709ef8ed14ce9f0792
tree3d74ddf2bb22cfea3ca613e13c76994fd7c910c9
parent17bc452aa33d33daa5044dcf8e960c784ee122fb
PM / Hibernate: Do not leak memory in error/test code paths

The hibernation core code forgets to release memory preallocated
for hibernation if there's an error in its early stages or if test
modes causing hibernation_snapshot() to return early are used.  This
causes the system to be hardly usable, because the amount of
preallocated memory is usually huge.  Fix this problem.

Reported-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
kernel/power/hibernate.c