Commit 600c20f3 authored by Jike Song's avatar Jike Song Committed by Greg Kroah-Hartman

driver core: fix memory leak on one error path in bus_register()

Reported-by: huangweibing@gmail.com
Signed-off-by: default avatarJike Song <albcamus@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c462e8cd
......@@ -945,8 +945,8 @@ int bus_register(struct bus_type *bus)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment