]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: fix possible memory leak in bch_cached_dev_run()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 22 Jul 2019 14:12:36 +0000 (22:12 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Jul 2019 14:15:17 +0000 (08:15 -0600)
commit2293f6d075a01bf53a3264579d7cf5203ad3f499
tree97cdecef1fbeaa5205e732ee8695f00d80806beb
parentca54e535238ab6e6d81c7ab071c68c645593f02b
bcache: fix possible memory leak in bch_cached_dev_run()

memory malloced in bch_cached_dev_run() and should be freed before
leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: f12f213c1b11 ("bcache: add return value check to bch_cached_dev_run()")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c