mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
lightnvm: free properly on target creation error
Fix a memory leak when target creation fails. More specifically, free the entire device structure given to the target (tgt_dev). Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <matias@cnexlabs.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
38ea2f7656
commit
deccf5a52e
1 changed files with 1 additions and 1 deletions
|
|
@ -303,7 +303,7 @@ err_init:
|
|||
err_queue:
|
||||
blk_cleanup_queue(tqueue);
|
||||
err_dev:
|
||||
kfree(tgt_dev);
|
||||
nvm_remove_tgt_dev(tgt_dev);
|
||||
err_t:
|
||||
kfree(t);
|
||||
err_reserve:
|
||||
|
|
|
|||
Loading…
Reference in a new issue