Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5be04ee authored by Shenghui Wang's avatar Shenghui Wang Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit b9a1ff504b9492ad6beb7d5606e0e3365d4d8499 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 177edf25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2236,7 +2236,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);