diff options
author | Ming Lei <tom.leiming@gmail.com> | 2014-04-19 18:00:16 +0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-21 10:38:34 -0600 |
commit | 11471e0d04f3762b9216d8421ce6e9d89b0bf450 (patch) | |
tree | 1127998724da07ee384d3464812d60d94f311284 /block/blk-mq.c | |
parent | dc4a93078b8a6a10d2dcaba76ab488d6dbe73922 (diff) |
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 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 1 |
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; |