Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7760d63 authored by Ilya Dryomov's avatar Ilya Dryomov Committed by Al Viro
Browse files

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: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e76b6312
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;