aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
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 /pkg
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 'pkg')
-rw-r--r--pkg/csource/generated.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 8399a441a..60a1ff964 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -7023,7 +7023,7 @@ static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcele
munmap(dest, max_destlen);
return -1;
}
- return munmap(dest, destlen);
+ return munmap(dest, max_destlen);
}
#include <errno.h>
@@ -12213,7 +12213,7 @@ static int puff_zlib_to_file(const unsigned char* source, unsigned long sourcele
munmap(dest, max_destlen);
return -1;
}
- return munmap(dest, destlen);
+ return munmap(dest, max_destlen);
}
#include <errno.h>