VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Douglas Gilbert <dgilbert@interlog.com> 2020-10-15 14:57:35 -0400 committer: Jens Axboe <axboe@kernel.dk> 2020-10-16 09:31:09 -0600 commit: b2a182a40278bc5849730e66bca01a762188ed86 parent: a48faebe65b0db55a73b9220c3d919eee849bb79
Commit Summary:
sgl_alloc_order: fix memory leak
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 5d63a8857f36..c448642e0f78 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -514,7 +514,7 @@ struct scatterlist *sgl_alloc_order(unsigned long long length,
 		elem_len = min_t(u64, length, PAGE_SIZE << order);
 		page = alloc_pages(gfp, order);
 		if (!page) {
-			sgl_free(sgl);
+			sgl_free_order(sgl, order);
 			return NULL;
 		}