提交 0934ce87 编写于 作者: H Hans Holmberg 提交者: Jens Axboe

lightnvm: pblk: fix pblk_lines_init error handling path

The chunk metadata is allocated with vmalloc, so we need to use
vfree to free it.

Fixes: 090ee26f ("lightnvm: use internal allocation for chunk log page")
Signed-off-by: NHans Holmberg <hans.holmberg@cnexlabs.com>
Reviewed-by: NJavier González <javier@javigon.com>
Signed-off-by: NMatias Bjørling <mb@lightnvm.io>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 c9a1d640
......@@ -1060,7 +1060,7 @@ static int pblk_lines_init(struct pblk *pblk)
pblk_line_meta_free(l_mg, &pblk->lines[i]);
kfree(pblk->lines);
fail_free_chunk_meta:
kfree(chunk_meta);
vfree(chunk_meta);
fail_free_luns:
kfree(pblk->luns);
fail_free_meta:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册