From: Shenghui Wang Date: Mon, 1 Apr 2019 13:40:36 +0000 (+0800) Subject: block: use blk_free_flush_queue() to free hctx->fq in blk_mq_init_hctx X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b9a1ff504b9492ad6beb7d5606e0e3365d4d8499;p=linux.git 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: Ming Lei Signed-off-by: Shenghui Wang Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index 3ff3d7b499697..f3b0d33bdf882 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -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);