]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: prevent double free on init error
authorMatias Bjørling <m@bjorling.me>
Mon, 16 Nov 2015 14:34:43 +0000 (15:34 +0100)
committerJens Axboe <axboe@fb.com>
Mon, 16 Nov 2015 22:20:33 +0000 (15:20 -0700)
commit0c552e93b7e53f2334d2ace2028ccd24f5e187b4
treead2c41ab89caa8ae004636b26d495be3f9bbef9b
parentca6c86d7ea7754bccce5033a73d20c1dcd026d52
lightnvm: prevent double free on init error

Both the nvm_register and nvm_init does a kfree(dev) on error. Make sure
to only free it once.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c