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>
This commit is contained in:
Shenghui Wang 2019-04-01 21:40:36 +08:00 коммит произвёл Jens Axboe
Родитель 42b1bd33dc
Коммит b9a1ff504b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);