summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2014-04-19 12:00:16 +0200
committerJens Axboe <axboe@fb.com>2014-04-21 18:38:34 +0200
commit11471e0d04f3762b9216d8421ce6e9d89b0bf450 (patch)
tree1127998724da07ee384d3464812d60d94f311284 /block/blk-mq.c
parentsd/skd: stuff discard page in request->completion_data (diff)
downloadlinux-11471e0d04f3762b9216d8421ce6e9d89b0bf450.tar.xz
linux-11471e0d04f3762b9216d8421ce6e9d89b0bf450.zip
blk-mq: free hctx->ctx_map when init failed
Avoid memory leak in the failure path. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r--block/blk-mq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ee225cc312b8..5fbbb221d499 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1289,6 +1289,7 @@ static int blk_mq_init_hw_queues(struct request_queue *q,
blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier);
kfree(hctx->ctxs);
+ kfree(hctx->ctx_map);
}
return 1;