From 20ffab64abed12f46888ef4a7cffa153745c592f Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 10 Feb 2026 12:45:55 +0000 Subject: Fix mapping in tcpto, fix diagnostic in smtproutes --- src/qmail-remote/qmailr_tcpto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qmail-remote/qmailr_tcpto.c') diff --git a/src/qmail-remote/qmailr_tcpto.c b/src/qmail-remote/qmailr_tcpto.c index 3b7ffeb..c015d21 100644 --- a/src/qmail-remote/qmailr_tcpto.c +++ b/src/qmail-remote/qmailr_tcpto.c @@ -44,7 +44,7 @@ int qmailr_tcpto_match (char const *ip, int is6) uint32_t iplen = is6 ? 16 : 4 ; uint32_t width = iplen + 12 ; int r = 0 ; - char const *map ; + char *map ; char const *p ; struct stat st ; int fd = openc_read(file) ; @@ -69,6 +69,7 @@ int qmailr_tcpto_match (char const *ip, int is6) r = tai_sec(&when) < ((60 + (getpid() & 31)) << 6) ; /* don't ask me, ask djb */ } } + munmap(map, st.st_size) ; end: fd_close(fd) ; return r ; -- cgit v1.3.1