GIT: unionfs2-2.6.27.y: fs/unionfs/: Fix a memory leak in unionfs_read_super

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:51 EDT 2010


commit 19e82ab11967dac0ee3689863b669c01172dcd76
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Fri Mar 2 13:35:33 2007 -0500

    fs/unionfs/: Fix a memory leak in unionfs_read_super
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
    Signed-off-by: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>

diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index ca7ee26..bd64242 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -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)) {


More information about the unionfs-cvs mailing list