commit | 11471e0d04f3762b9216d8421ce6e9d89b0bf450 | [log] [tgz] |
---|---|---|
author | Ming Lei <tom.leiming@gmail.com> | Sat Apr 19 18:00:16 2014 +0800 |
committer | Jens Axboe <axboe@fb.com> | Mon Apr 21 10:38:34 2014 -0600 |
tree | 1127998724da07ee384d3464812d60d94f311284 | |
parent | dc4a93078b8a6a10d2dcaba76ab488d6dbe73922 [diff] [blame] |
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>
diff --git a/block/blk-mq.c b/block/blk-mq.c index ee225cc..5fbbb22 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c
@@ -1289,6 +1289,7 @@ blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier); kfree(hctx->ctxs); + kfree(hctx->ctx_map); } return 1;