aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorZhiyao Feng <zhiyaofeng22@gmail.com>2023-10-05 21:40:25 +0200
committerAleksandr Nogikh <nogikh@google.com>2023-10-06 11:31:17 +0000
commite8b68ae4f4fbc4ea9dd72af034c2bafdafb85f5e (patch)
treeac36d0d2430465ca1086f1cd5b8280c98168eaba /executor
parentdb17ad9f74e0dd4957ca80d1e7fe4478aa57c9da (diff)
executor/common_zlib: fix an mmap leak
The `mmap` size is `max_destlen`, but `munmap` size is `destlen`, which causes a memory leak.
Diffstat (limited to 'executor')
-rw-r--r--executor/common_zlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/common_zlib.h b/executor/common_zlib.h
index fdbd9d4b6..a7eacfc10 100644
--- a/executor/common_zlib.h
+++ b/executor/common_zlib.h
@@ -494,5 +494,5 @@ static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcele
return -1;
}
// Unmap memory-mapped region
- return munmap(dest, destlen);
+ return munmap(dest, max_destlen);
}