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-Tag: v2.6.36-rc1~521^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=600c20f34f645adf7884277302b10601583aa7d5;p=platform%2Fkernel%2Flinux-exynos.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 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; }