From: Rashika Kheria Date: Sun, 10 Nov 2013 16:43:53 +0000 (+0530) Subject: Staging: zram: Fix memory leak by refcount mismatch X-Git-Tag: v3.13-rc2~16^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b672224d128ec2570eb37572ff803cfe452b4f7;p=pandora-kernel.git Staging: zram: Fix memory leak by refcount mismatch As suggested by Minchan Kim and Jerome Marchand "The code in reset_store get the block device (bdget_disk()) but it does not put it (bdput()) when it's done using it. The usage count is therefore incremented but never decremented." This patch also puts bdput() for all error cases. Acked-by: Minchan Kim Acked-by: Jerome Marchand Cc: stable@vger.kernel.org Signed-off-by: Rashika Kheria Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed