]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - fs/ocfs2/filecheck.c
ocfs2: fix error path kobject memory leak
[thirdparty/kernel/stable.git] / fs / ocfs2 / filecheck.c
index f65f2b2f594d4f0a705faf58ab068054124d79af..1906cc962c4d935055ddc83420354573b2cb16a2 100644 (file)
@@ -193,6 +193,7 @@ int ocfs2_filecheck_create_sysfs(struct ocfs2_super *osb)
        ret = kobject_init_and_add(&entry->fs_kobj, &ocfs2_ktype_filecheck,
                                        NULL, "filecheck");
        if (ret) {
+               kobject_put(&entry->fs_kobj);
                kfree(fcheck);
                return ret;
        }