]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: fix resource leak of invalid_bitmap
authorColin Ian King <colin.king@canonical.com>
Tue, 5 Jun 2018 15:14:56 +0000 (16:14 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 5 Jun 2018 15:20:27 +0000 (09:20 -0600)
commit068078a72b3890b68cbac593fa65a2cab2957fd5
treea10d6ff943013ca12d4fcbea863a12a276eadb53
parent49f78d9f223ab00c56987c41c206d1266eed8867
lightnvm: pblk: fix resource leak of invalid_bitmap

Currently the error exit path when the emeta could not be
interpreted is via fail_free_ws and this fails to free
invalid_bitmap.  Fix this by adding another exit label and
exiting via this to kfree invalid_bitmap.

Detected by CoverityScan, CID#1469659 ("Resource leak")

Fixes: 3e2c3098df83 ("lightnvm: pblk: garbage collect lines with failed writes")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-gc.c