[patch 084/101] v9fs_vfs_mkdir(): fix a double free
From: Greg KH
Date: Wed Mar 07 2007 - 12:26:06 EST
From: Adrian Bunk <bunk@xxxxxxxxx>
Fix a double free of "dfid" introduced by commit
da977b2c7eb4d6312f063a7b486f2aad99809710 and spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>
Cc: Eric Van Hensbergen <ericvh@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
fs/9p/vfs_inode.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--- linux-2.6.20.1.orig/fs/9p/vfs_inode.c
+++ linux-2.6.20.1/fs/9p/vfs_inode.c
@@ -585,17 +585,14 @@ static int v9fs_vfs_mkdir(struct inode *
if (IS_ERR(inode)) {
err = PTR_ERR(inode);
inode = NULL;
- goto clean_up_fids;
+ v9fs_fid_destroy(vfid);
+ goto error;
}
dentry->d_op = &v9fs_dentry_operations;
d_instantiate(dentry, inode);
return 0;
-clean_up_fids:
- if (vfid)
- v9fs_fid_destroy(vfid);
-
clean_up_dfid:
v9fs_fid_clunk(v9ses, dfid);
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/