提交 b9a1ff50 编写于 作者: S Shenghui Wang 提交者: Jens Axboe

block: use blk_free_flush_queue() to free hctx->fq in blk_mq_init_hctx

kfree() can leak the hctx->fq->flush_rq field.
Reviewed-by: NMing Lei <ming.lei@redhat.com>
Signed-off-by: NShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 42b1bd33
......@@ -2332,7 +2332,7 @@ static int blk_mq_init_hctx(struct request_queue *q,
return 0;
free_fq:
kfree(hctx->fq);
blk_free_flush_queue(hctx->fq);
exit_hctx:
if (set->ops->exit_hctx)
set->ops->exit_hctx(hctx, hctx_idx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册