OSDN Git Service

blk-mq: Fix memory leak in blk_mq_init_allocated_queue error handling
authorzhengbin <zhengbin13@huawei.com>
Tue, 23 Jul 2019 14:10:42 +0000 (22:10 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Aug 2019 14:15:36 +0000 (08:15 -0600)
commit73d9c8d4c0017e21e1ff519474ceb1450484dc9a
tree1d557ba1de029f9cb5025e204bd805beea4f0962
parent52f6f9d74f31078964ca1574f7bb612da7877ac8
blk-mq: Fix memory leak in blk_mq_init_allocated_queue error handling

If blk_mq_init_allocated_queue->elevator_init_mq fails, need to release
the previously requested resources.

Fixes: d34849913819 ("blk-mq-sched: allow setting of default IO scheduler")
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c