Skip to content

Commit

Permalink
page-pipe: fix memory leak on error path
Browse files Browse the repository at this point in the history
CID 996197 (cyrillos#1 of 1): Resource leak (RESOURCE_LEAK)
8. leaked_storage: Variable ppb going out of scope leaks the storage it points to.
  • Loading branch information
avagin committed Apr 4, 2013
1 parent fe19f65 commit e992eef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions page-pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ static int page_pipe_grow(struct page_pipe *pp)
return -1;

if (pipe(ppb->p)) {
xfree(ppb);
pr_perror("Can't make pipe for page-pipe");
return -1;
}
Expand Down

0 comments on commit e992eef

Please sign in to comment.