Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dda6b022f3222f09d3fb49f5dfabd31d33e0d10b
Commit:     dda6b022f3222f09d3fb49f5dfabd31d33e0d10b
Parent:     2655e2cee2d77459fcb7e10228259e4ee0328697
Author:     Latchesar Ionkov <[EMAIL PROTECTED]>
AuthorDate: Tue Nov 6 08:02:53 2007 -0600
Committer:  Eric Van Hensbergen <[EMAIL PROTECTED]>
CommitDate: Tue Nov 6 08:02:53 2007 -0600

    9p: fix memory leak in v9fs_get_sb
    
    This patch fixes a memory leak in v9fs_get_sb.
    
    Signed-off-by: Latchesar Ionkov <[EMAIL PROTECTED]>
    Acked-by: Eric Van Hensbergen <[EMAIL PROTECTED]>
---
 fs/9p/vfs_super.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index bb0cef9..678c02f 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -119,6 +119,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, 
int flags,
 
        P9_DPRINTK(P9_DEBUG_VFS, " \n");
 
+       st = NULL;
        v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL);
        if (!v9ses)
                return -ENOMEM;
@@ -164,10 +165,12 @@ static int v9fs_get_sb(struct file_system_type *fs_type, 
int flags,
        root->d_inode->i_ino = v9fs_qid2ino(&st->qid);
        v9fs_stat2inode(st, root->d_inode, sb);
        v9fs_fid_add(root, fid);
+       kfree(st);
 
        return simple_set_mnt(mnt, sb);
 
 error:
+       kfree(st);
        if (fid)
                p9_client_clunk(fid);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to