X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2Fkobject.c;h=057921c5945a551777f56706b397c5e4f737aaf3;hb=1ad5b4a5c224c5f98f9745adbcf99899624c8138;hp=f4f6176dcd1286313c57ae80239ec1f0f7bbf65e;hpb=cb2ebc59ff52cee770cfd6ba5f23a6cc3c214648;p=powerpc.git diff --git a/lib/kobject.c b/lib/kobject.c index f4f6176dcd..057921c594 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -385,9 +385,11 @@ int kobject_move(struct kobject *kobj, struct kobject *new_parent) goto out; old_parent = kobj->parent; kobj->parent = new_parent; + new_parent = NULL; kobject_put(old_parent); kobject_uevent_env(kobj, KOBJ_MOVE, envp); out: + kobject_put(new_parent); kobject_put(kobj); kfree(devpath_string); kfree(devpath);