Commit:     88db4721d47bc59b92d46de04e21c7975ea983f2
Parent:     14193fb91a7d88d3fe55d3160892edeb2b02e0c2
Author:     Cornelia Huck <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 10 14:35:27 2007 +0200
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 10:57:30 2007 -0700

    kobject: kobject_add() reference leak
    We leak a reference if we attempt to add a kobject with no name.
    Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 lib/kobject.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/kobject.c b/lib/kobject.c
index db1d237..eb251aa 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -174,6 +174,7 @@ int kobject_shadow_add(struct kobject * kobj, struct dentry 
        if (!*kobj->k_name) {
                pr_debug("kobject attempted to be registered with no name!\n");
+               kobject_put(kobj);
                return -EINVAL;
        parent = kobject_get(kobj->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