Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d9371c0d authored by Rashika Kheria's avatar Rashika Kheria Committed by Mark Salyzyn
Browse files

Staging: zram: Fix memory leak by refcount mismatch



(cherry pick from commit 1b672224d128ec2570eb37572ff803cfe452b4f7)

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: default avatarMinchan Kim <minchan@kernel.org>
Acked-by: default avatarJerome Marchand <jmarchan@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 24810447
Change-Id: I034c6cc59426fee5ee6f069ae9cf9ca5395202a2
parent 064fe07e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment