Skip to content

Commit

Permalink
[PATCH] double-free of inode on alloc_file() failure exit in create_w…
Browse files Browse the repository at this point in the history
…rite_pipe()

Duh...  Fortunately, the bug is quite recent (post-2.6.25) and, embarrassingly,
mine ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 22, 2008
1 parent 521b5d0 commit ed15243
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,10 @@ struct file *create_write_pipe(void)
return f;

err_dentry:
free_pipe_info(inode);
dput(dentry);
return ERR_PTR(err);

err_inode:
free_pipe_info(inode);
iput(inode);
Expand Down

0 comments on commit ed15243

Please sign in to comment.