fs/unionfs/: Fix a memory leak in unionfs_read_super
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 2 Mar 2007 18:35:33 +0000 (13:35 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:31:08 +0000 (21:31 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
fs/unionfs/main.c

index ca7ee26040cee98aef35582894c2854ffe765751..bd64242d75233b0379fde5e5deb667b594b7d46e 100644 (file)
@@ -584,10 +584,11 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
        atomic_set(&UNIONFS_D(sb->s_root)->generation, 1);
 
        /* call interpose to create the upper level inode */
-       if ((err = unionfs_interpose(sb->s_root, sb, 0)))
-               goto out_freedpd;
+       err = unionfs_interpose(sb->s_root, sb, 0);
        unionfs_unlock_dentry(sb->s_root);
-       goto out;
+       if (!err)
+               goto out;
+       /* else fall through */
 
 out_freedpd:
        if (UNIONFS_D(sb->s_root)) {