]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: fix error handling of pblk_lines_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 9 Oct 2018 11:12:13 +0000 (13:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Oct 2018 14:25:08 +0000 (08:25 -0600)
commit9f47e024e0653e4edb8296b9d8c8ec8e80f810ad
tree43ba48e94d8a631a52eda2ef14c5abf107e1c8e8
parent4cf80dfa69d4bddacaec1a6b05ba9a885ffc9521
lightnvm: pblk: fix error handling of pblk_lines_init()

In the too many bad blocks error handling case, we should release all
the allocated resources, otherwise it will cause memory leak.

Fixes: 325c4bc65729 ("lightnvm: pblk: fail gracefully on line alloc. failure")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-init.c