lightnvm: pblk: fix double-free on pblk init

Prevent pblk->lines being double freed in case of an error during pblk
initialization.

Fixes: dd2a43437337: "lightnvm: pblk: sched. metadata on write thread"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Javier González 2017-06-30 17:56:35 +02:00 коммит произвёл Jens Axboe
Родитель f417aa0bd8
Коммит 2950e7e610
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -812,8 +812,6 @@ add_emeta_page:
fail_free_lines:
while (--i >= 0)
pblk_free_line_bitmaps(&pblk->lines[i]);
kfree(pblk->lines);
fail_free_bb_aux:
kfree(l_mg->bb_aux);
fail_free_bb_template: