diff options
author | Javier González <jg@lightnvm.io> | 2017-06-30 17:56:35 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-30 19:08:18 +0200 |
commit | 2950e7e61089de0e7058fdf04a53d25e078f2230 (patch) | |
tree | 6dc10f064c0f903a393ae194cd247fe6e7d7bf8c /drivers/lightnvm/pblk-init.c | |
parent | lightnvm: pblk: fix bad le64 assignations (diff) | |
download | linux-2950e7e61089de0e7058fdf04a53d25e078f2230.tar.xz linux-2950e7e61089de0e7058fdf04a53d25e078f2230.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/lightnvm/pblk-init.c | 2 |
1 files changed, 0 insertions, 2 deletions
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: |