Commit 600c20f34f645adf7884277302b10601583aa7d5

Authored by Jike Song
Committed by Greg Kroah-Hartman
1 parent c462e8cd57

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -945,8 +945,8 @@
945 945 bus_remove_file(bus, &bus_attr_uevent);
946 946 bus_uevent_fail:
947 947 kset_unregister(&bus->p->subsys);
948   - kfree(bus->p);
949 948 out:
  949 + kfree(bus->p);
950 950 bus->p = NULL;
951 951 return retval;
952 952 }