Commit b9a1ff50 authored by Shenghui Wang's avatar Shenghui Wang Committed by 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: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarShenghui Wang <shhuiw@foxmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 42b1bd33
...@@ -2332,7 +2332,7 @@ static int blk_mq_init_hctx(struct request_queue *q, ...@@ -2332,7 +2332,7 @@ static int blk_mq_init_hctx(struct request_queue *q,
return 0; return 0;
free_fq: free_fq:
kfree(hctx->fq); blk_free_flush_queue(hctx->fq);
exit_hctx: exit_hctx:
if (set->ops->exit_hctx) if (set->ops->exit_hctx)
set->ops->exit_hctx(hctx, hctx_idx); set->ops->exit_hctx(hctx, hctx_idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment