[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1397749778-14485-2-git-send-email-tom.leiming@gmail.com>
Date: Thu, 17 Apr 2014 23:49:35 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Cc: Christoph Hellwig <hch@....de>, Ming Lei <tom.leiming@...il.com>
Subject: [PATCH next 1/4] blk-mq: free hctx->ctx_map when init failed
Avoid memory leak in the failure path.
Signed-off-by: Ming Lei <tom.leiming@...il.com>
---
block/blk-mq.c | 1 +
1 file changed, 1 insertion(+)
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 @@ 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;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists