diff options
author | Shenghui Wang <shhuiw@foxmail.com> | 2019-04-01 16:40:36 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-02 17:20:06 +0300 |
commit | b9a1ff504b9492ad6beb7d5606e0e3365d4d8499 (patch) | |
tree | fe67ce2d34f93cddbebcd8b4abd4b0df15f1d808 /block/blk-mq.c | |
parent | 42b1bd33dcdef4ffd98f695e188bab82f9fa46d8 (diff) |
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 <ming.lei@redhat.com>
Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 3ff3d7b49969..f3b0d33bdf88 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); |