From: Jike Song Date: Thu, 15 Jul 2010 09:43:54 +0000 (+0800) Subject: driver core: fix memory leak on one error path in bus_register() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=600c20f34f645adf7884277302b10601583aa7d5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git driver core: fix memory leak on one error path in bus_register() Reported-by: huangweibing@gmail.com Signed-off-by: Jike Song Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 12eec3f633b1..eb1b7fa20dce 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; }