Commit:     9e993efb0da827634778554070f3c3ec4bdade33
Parent:     a2807dbcbd681e1f36e813fb26e2f24d15018b91
Author:     Dmitriy Monakhov <[EMAIL PROTECTED]>
AuthorDate: Sat Mar 3 16:11:21 2007 +0300
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Mar 9 15:32:58 2007 -0800

    kobject: new_device->kref wasn't putted after error in kobject_move()
    If error happen we jump to "out" label, in this case new_device not yet
    became the parent but it wasn't putted.
    Signed-off-by: Monakhov Dmitriy <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 lib/kobject.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/kobject.c b/lib/kobject.c
index f4f6176..057921c 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -385,9 +385,11 @@ int kobject_move(struct kobject *kobj, struct kobject 
                goto out;
        old_parent = kobj->parent;
        kobj->parent = new_parent;
+       new_parent = NULL;
        kobject_uevent_env(kobj, KOBJ_MOVE, envp);
+       kobject_put(new_parent);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to