imfile: fix cosmetic memory leak

This "leak" happens only during termination, so it does not
affect real use cases. However, it makes valgrind tests err out.
This commit is contained in:
Rainer Gerhards 2015-05-18 14:17:52 +02:00
parent 6ad84d0baa
commit 12182ac630
2 changed files with 10 additions and 0 deletions

View File

@ -1869,6 +1869,12 @@ CODESTARTmodExit
objRelease(errmsg, CORE_COMPONENT);
objRelease(prop, CORE_COMPONENT);
objRelease(ruleset, CORE_COMPONENT);
if(dirs != NULL) {
free(dirs->active.listeners);
free(dirs->configured.listeners);
free(dirs);
}
free(wdmap);
ENDmodExit

View File

@ -6,6 +6,10 @@
# begun 2009-05-27 by rgerhards
# This file is part of the rsyslog project, released under GPLv3
#valgrind="valgrind --malloc-fill=ff --free-fill=fe --log-fd=1"
# **** use the line below for very hard to find leaks! *****
#valgrind="valgrind --leak-check=full --show-leak-kinds=all --malloc-fill=ff --free-fill=fe --log-fd=1"
#valgrind="valgrind --tool=drd --log-fd=1"
#valgrind="valgrind --tool=helgrind --log-fd=1"
#valgrind="valgrind --tool=exp-ptrcheck --log-fd=1"