From e8b68ae4f4fbc4ea9dd72af034c2bafdafb85f5e Mon Sep 17 00:00:00 2001 From: Zhiyao Feng Date: Thu, 5 Oct 2023 21:40:25 +0200 Subject: executor/common_zlib: fix an mmap leak The `mmap` size is `max_destlen`, but `munmap` size is `destlen`, which causes a memory leak. --- executor/common_zlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor/common_zlib.h') 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); } -- cgit mrf-deployment