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

Commit 49aaf012 authored by Pan Bian's avatar Pan Bian Committed by Greg Kroah-Hartman
Browse files

lightnvm: fix memory leak when submit fails



commit 97784481757fba7570121a70dd37ca74a29f50a8 upstream.

The allocated page is not released if error occurs in
nvm_submit_io_sync_raw(). __free_page() is moved ealier to avoid
possible memory leak issue.

Fixes: aff3fb18 ("lightnvm: move bad block and chunk state logic to core")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ff55fc4
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