提交 11471e0d 编写于 作者: M Ming Lei 提交者: Jens Axboe

blk-mq: free hctx->ctx_map when init failed

Avoid memory leak in the failure path.
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NMing Lei <tom.leiming@gmail.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 dc4a9307
......@@ -1289,6 +1289,7 @@ static int blk_mq_init_hw_queues(struct request_queue *q,
blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier);
kfree(hctx->ctxs);
kfree(hctx->ctx_map);
}
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册