From ec60ec8496b4e445f07fa4a9e21eb0c8f4506c7f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 14 Nov 2012 09:43:56 +0100 Subject: bugfix: very small memory leak in imrelp This is not a real problem (thus no ChangeLog entry): we leaked a few bytes for every relp listener, but only at rsyslogd TERMINATION - where obviously the OS does the cleanup. However, the leak could cause some confusion with memory checkers like valgrind. --- plugins/imrelp/imrelp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c index fe987a50..5ee3b4b9 100644 --- a/plugins/imrelp/imrelp.c +++ b/plugins/imrelp/imrelp.c @@ -303,7 +303,14 @@ ENDactivateCnf BEGINfreeCnf + instanceConf_t *inst, *del; CODESTARTfreeCnf + for(inst = pModConf->root ; inst != NULL ; ) { + free(inst->pszBindPort); + del = inst; + inst = inst->next; + free(del); + } ENDfreeCnf /* This is used to terminate the plugin. Note that the signal handler blocks -- cgit v1.2.3