VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Tobin C. Harding <tobin@kernel.org> 2019-05-31 22:30:29 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2019-06-01 15:51:31 -0700 commit: b9fba67b3806e21b98bd5a98dc3921a8e9b42d61 parent: 3e8589963773a5c23e2f1fe4bcad0e9a90b7f471
Commit Summary:
ocfs2: fix error path kobject memory leak
Diffstat:
1 file changed, 1 insertion, 0 deletions
diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index f65f2b2f594d..1906cc962c4d 100644
--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -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;
 	}