Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ccac88eeb5659c716af8e695e2943509c80d172
Commit:     5ccac88eeb5659c716af8e695e2943509c80d172
Parent:     ba6d8b1eba88665d12edd53385d3e26fce5613a3
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 18 13:31:18 2006 +0000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Dec 21 00:16:03 2006 -0800

    [PATCH] fix leaks on pipe(2) failure exits
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/pipe.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 9a06e8e..68090e8 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -935,8 +935,9 @@ struct file *create_write_pipe(void)
 
 void free_write_pipe(struct file *f)
 {
-       mntput(f->f_path.mnt);
+       free_pipe_info(f->f_dentry->d_inode);
        dput(f->f_path.dentry);
+       mntput(f->f_path.mnt);
        put_filp(f);
 }
 
@@ -994,6 +995,8 @@ int do_pipe(int *fd)
  err_fdr:
        put_unused_fd(fdr);
  err_read_pipe:
+       dput(fr->f_dentry);
+       mntput(fr->f_vfsmnt);
        put_filp(fr);
  err_write_pipe:
        free_write_pipe(fw);
-
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