diff options
author | Jike Song <albcamus@gmail.com> | 2010-07-15 05:43:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-05 16:53:35 -0400 |
commit | 600c20f34f645adf7884277302b10601583aa7d5 (patch) | |
tree | b37760bb8e867d31240cdaf512b2ab5363bf3c86 /drivers/base | |
parent | c462e8cd57869a81223c5cad2d5a61b491634229 (diff) |
driver core: fix memory leak on one error path in bus_register()
Reported-by: huangweibing@gmail.com
Signed-off-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | 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 12eec3f633b1..eb1b7fa20dce 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -945,8 +945,8 @@ bus_devices_fail: | |||
945 | bus_remove_file(bus, &bus_attr_uevent); | 945 | bus_remove_file(bus, &bus_attr_uevent); |
946 | bus_uevent_fail: | 946 | bus_uevent_fail: |
947 | kset_unregister(&bus->p->subsys); | 947 | kset_unregister(&bus->p->subsys); |
948 | kfree(bus->p); | ||
949 | out: | 948 | out: |
949 | kfree(bus->p); | ||
950 | bus->p = NULL; | 950 | bus->p = NULL; |
951 | return retval; | 951 | return retval; |
952 | } | 952 | } |