nvme: lightnvm: fix memory leak
authorRakesh Pandit <rakesh@tuxera.com>
Tue, 9 May 2017 14:48:25 +0000 (08:48 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 10 May 2017 13:39:43 +0000 (07:39 -0600)
commitfba704b494fdc6816a039a66887274b4e5c00eeb
treed86d13909a28d2686e6154550b9184619d0524ad
parentebd768579552a10682c2cbdfa657779dea62a01d
nvme: lightnvm: fix memory leak

Free up kmalloc allocated memory if failure happens while handling L2P
table transfer in nvme_nvm_get_l2p_tbl.

Fixes: 8e79b5cb ("lightnvm: move block provisioning to targets")
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/lightnvm.c