提交 d7760d63 编写于 作者: I Ilya Dryomov 提交者: Al Viro

iov_iter: fix memory leak in pipe_get_pages_alloc()

Make n signed to avoid leaking the pages array if __pipe_get_pages()
fails to allocate any pages.
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 e76b6312
......@@ -1102,7 +1102,7 @@ static ssize_t pipe_get_pages_alloc(struct iov_iter *i,
size_t *start)
{
struct page **p;
size_t n;
ssize_t n;
int idx;
int npages;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册