Commit 055b9372 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

page-pipe: fix memory leak on error path

CID 996197 (#1 of 1): Resource leak (RESOURCE_LEAK)
8. leaked_storage: Variable ppb going out of scope leaks the storage it points to.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c518d47a
...@@ -17,6 +17,7 @@ static int page_pipe_grow(struct page_pipe *pp) ...@@ -17,6 +17,7 @@ static int page_pipe_grow(struct page_pipe *pp)
return -1; return -1;
if (pipe(ppb->p)) { if (pipe(ppb->p)) {
xfree(ppb);
pr_perror("Can't make pipe for page-pipe"); pr_perror("Can't make pipe for page-pipe");
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment