-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
Important
-
rhel-sst-cs-net-perf-services
-
ssg_core_services
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
A customer is seeing a memory leak in sendmail-milter on RHEL8, compared to RHEL9.
Digging into this, I could see the following patch related to memory usage:
$ diff -u rhel-8.8.0/sendmail-8.15.2/libmilter/engine.c rhel-9.2.0/sendmail-8.16.1/libmilter/engine.c --- rhel-8.8.0/sendmail-8.15.2/libmilter/engine.c 2015-05-22 15:42:27.000000000 +0200 +++ rhel-9.2.0/sendmail-8.16.1/libmilter/engine.c 2020-05-19 21:54:32.000000000 +0200 [...] @@ -703,8 +703,12 @@ (void *) &v, MILTER_LEN_BYTES); len = milter_addsymlist(ctx, buf, &buffer); if (buffer != NULL) + { ret = mi_wr_cmd(sd, timeout_ptr, SMFIC_OPTNEG, buffer, len); + if (buffer != buf) + free(buffer); + } else ret = MI_FAILURE; } [...]
I gave a test package to the customer to confirm this fixes the leak for him.
Please provide the package NVR for which bug is seen:
sendmail-8.15.2
How reproducible:
Always on customer system
Steps to reproduce
The customer provided a test utility reproducing the leak in the original case.