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 <dmonakhov@openvz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Dmitriy Monakhov and committed by Greg Kroah-Hartman 9e993efb a2807dbc

+2
+2
lib/kobject.c
··· 385 385 goto out; 386 386 old_parent = kobj->parent; 387 387 kobj->parent = new_parent; 388 + new_parent = NULL; 388 389 kobject_put(old_parent); 389 390 kobject_uevent_env(kobj, KOBJ_MOVE, envp); 390 391 out: 392 + kobject_put(new_parent); 391 393 kobject_put(kobj); 392 394 kfree(devpath_string); 393 395 kfree(devpath);