lkml.org 
[lkml]   [2010]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 19/28] driver core: fix memory leak on one error path in bus_register()
    Date
    From: Jike Song <albcamus@gmail.com>

    Reported-by: huangweibing@gmail.com
    Signed-off-by: Jike Song <albcamus@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    drivers/base/bus.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/base/bus.c b/drivers/base/bus.c
    index 12eec3f..eb1b7fa 100644
    --- a/drivers/base/bus.c
    +++ b/drivers/base/bus.c
    @@ -945,8 +945,8 @@ bus_devices_fail:
    bus_remove_file(bus, &bus_attr_uevent);
    bus_uevent_fail:
    kset_unregister(&bus->p->subsys);
    - kfree(bus->p);
    out:
    + kfree(bus->p);
    bus->p = NULL;
    return retval;
    }
    --
    1.7.2


    \
     
     \ /
      Last update: 2010-08-06 00:35    [W:0.019 / U:0.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site