mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
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>
This commit is contained in:
parent
c462e8cd57
commit
600c20f34f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user