lkml.org 
[lkml]   [2009]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/7] blktrace: fix possible memory leak
    When we failed to create "block" debugfs dir, we should do come cleanups.

    Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
    ---
    kernel/trace/blktrace.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
    index b171778..fb3bc53 100644
    --- a/kernel/trace/blktrace.c
    +++ b/kernel/trace/blktrace.c
    @@ -432,7 +432,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
    if (!blk_tree_root) {
    blk_tree_root = debugfs_create_dir("block", NULL);
    if (!blk_tree_root)
    - return -ENOMEM;
    + goto err;
    }

    dir = debugfs_create_dir(buts->name, blk_tree_root);
    --
    1.5.4.rc3


    \
     
     \ /
      Last update: 2009-03-20 02:51    [W:0.020 / U:143.888 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site