diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-02-08 17:20:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 12:25:47 -0500 |
commit | 835d90c4218dffe6f9e7ac1ed79795197a4970c4 (patch) | |
tree | 4802f76f7cf874ff23cd4b33e733903d1f1b0127 | |
parent | da6e1a32fb8d7539a27f699c8671f64d7fefd0cc (diff) |
[PATCH] v9fs_vfs_mkdir(): fix a double free
Fix a double free of "dfid" introduced by commit
da977b2c7eb4d6312f063a7b486f2aad99809710 and spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/9p/vfs_inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 9109ba1d6969..378767c07bf1 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -585,17 +585,14 @@ static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
585 | if (IS_ERR(inode)) { | 585 | if (IS_ERR(inode)) { |
586 | err = PTR_ERR(inode); | 586 | err = PTR_ERR(inode); |
587 | inode = NULL; | 587 | inode = NULL; |
588 | goto clean_up_fids; | 588 | v9fs_fid_destroy(vfid); |
589 | goto error; | ||
589 | } | 590 | } |
590 | 591 | ||
591 | dentry->d_op = &v9fs_dentry_operations; | 592 | dentry->d_op = &v9fs_dentry_operations; |
592 | d_instantiate(dentry, inode); | 593 | d_instantiate(dentry, inode); |
593 | return 0; | 594 | return 0; |
594 | 595 | ||
595 | clean_up_fids: | ||
596 | if (vfid) | ||
597 | v9fs_fid_destroy(vfid); | ||
598 | |||
599 | clean_up_dfid: | 596 | clean_up_dfid: |
600 | v9fs_fid_clunk(v9ses, dfid); | 597 | v9fs_fid_clunk(v9ses, dfid); |
601 | 598 | ||