lightnvm: fix ioctl memory leaks
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sat, 28 Nov 2015 15:49:24 +0000 (16:49 +0100)
committerJens Axboe <axboe@fb.com>
Sun, 29 Nov 2015 21:34:57 +0000 (14:34 -0700)
commit76e25081b6ae60fb094328dedf900ec15f10a9fd
tree4c693cb15ec6985872a862414eb79f62a18748c7
parent8261bd48c6c9c36cd2c2e343a69e76a3be2b04a4
lightnvm: fix ioctl memory leaks

If copy_to_user() fails we returned error but we missed releasing
devices.

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