diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index c9fe659f3..e3d088478 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -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 diff --git a/tests/diag.sh b/tests/diag.sh index 8a8504c0a..319bf59e9 100755 --- a/tests/diag.sh +++ b/tests/diag.sh @@ -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"