From: Erez Zadok Date: Fri, 2 Mar 2007 18:35:33 +0000 (-0500) Subject: fs/unionfs/: Fix a memory leak in unionfs_read_super X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=5441cf56ec2621bdb864a032950abecc4fb33ef9;p=unionfs-3.15.y.git fs/unionfs/: Fix a memory leak in unionfs_read_super Signed-off-by: Erez Zadok Signed-off-by: Josef 'Jeff' Sipek --- diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c index ca7ee26040c..bd64242d752 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)) {