]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lightnvm: free properly on target creation error
authorJavier González <jg@lightnvm.io>
Tue, 31 Jan 2017 12:17:19 +0000 (13:17 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 31 Jan 2017 15:32:13 +0000 (08:32 -0700)
commitdeccf5a52ea59843f5575cb49fe532c7cb8801e4
treedf3f3a3bcd511def21dcd451cde36c002f1b4ceb
parent38ea2f7656f815e7330868cbec7bada0fd7933a8
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>
drivers/lightnvm/core.c