From 2950e7e61089de0e7058fdf04a53d25e078f2230 Mon Sep 17 00:00:00 2001 From: Javier González Date: Fri, 30 Jun 2017 17:56:35 +0200 Subject: lightnvm: pblk: fix double-free on pblk init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- drivers/lightnvm/pblk-init.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/lightnvm') diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 8bdaf7e0e00b..b3fc310aa51c 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -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: -- cgit v1.2.3