From: Ming Lei Date: Sat, 19 Apr 2014 10:00:16 +0000 (+0800) Subject: blk-mq: free hctx->ctx_map when init failed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11471e0d04f3762b9216d8421ce6e9d89b0bf450;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git blk-mq: free hctx->ctx_map when init failed Avoid memory leak in the failure path. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- 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;