lkml.org 
[lkml]   [2014]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH next 1/4] blk-mq: free hctx->ctx_map when init failed
    Date
    Avoid memory leak in the failure path.

    Signed-off-by: Ming Lei <tom.leiming@gmail.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


    \
     
     \ /
      Last update: 2014-04-17 18:21    [W:2.503 / U:0.168 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site