projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38ea2f7
)
lightnvm: free properly on target creation error
author
Javier González
<jg@lightnvm.io>
Tue, 31 Jan 2017 12:17:19 +0000
(13:17 +0100)
committer
Jens Axboe
<axboe@fb.com>
Tue, 31 Jan 2017 15:32:13 +0000
(08:32 -0700)
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>
drivers/lightnvm/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/lightnvm/core.c
b/drivers/lightnvm/core.c
index 4f4db991c4a6dd3443284628d01f880150b1aed5..b2cd3d6f2a31e0b5eae7eaf51e433d57a297a559 100644
(file)
--- a/
drivers/lightnvm/core.c
+++ b/
drivers/lightnvm/core.c
@@
-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: