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: 090ee26fd5 ("lightnvm: use internal allocation for chunk log page")
Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Reviewed-by: Javier González <javier@javigon.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Hans Holmberg 2018-12-11 20:16:15 +01:00 committed by Jens Axboe
parent c9a1d640d5
commit 0934ce87b5
1 changed files with 1 additions and 1 deletions

View File

@ -1060,7 +1060,7 @@ fail_free_lines:
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: