Page MenuHomeFreeBSD

Fix two memory leaks in syslogd
ClosedPublic

Authored by dab on Feb 26 2018, 1:05 AM.

Details

Summary

Bug 198385
reports a memory leak in processing of forward actions. This
modification adapts the patch submitted with that bug (by Sreeram) to
fix the leak. While testing the modification, another leak was also
found and fixed.

Submitted by: Sreeram

Test Plan

Run valgrind on syslogd with at least one forward entry
(i.e., an action of @some-host). Send SIGHUP several times so that the
configuration file is reloaded. Send SIGTERM to terminate
syslogd. Before the change, multiple blocks of memory are reported to
have been leaked. After the change, no leaks are shown:

==34004== LEAK SUMMARY:
==34004==    definitely lost: 0 bytes in 0 blocks
==34004==    indirectly lost: 0 bytes in 0 blocks
==34004==      possibly lost: 0 bytes in 0 blocks

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dab created this revision.Feb 26 2018, 1:05 AM
dab edited the summary of this revision. (Show Details)Feb 26 2018, 1:14 AM
dab edited the test plan for this revision. (Show Details)
dab edited the test plan for this revision. (Show Details)
hrs accepted this revision.Feb 26 2018, 1:20 AM

Looks good to me. Thank you for taking care of it!

This revision is now accepted and ready to land.Feb 26 2018, 1:20 AM
This revision was automatically updated to reflect the committed changes.