diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-21 13:55:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-21 13:55:45 +0200 |
commit | 63446424c057f527c9c17be7e06f306a130789b4 (patch) | |
tree | f860f85b933793bf49e26f18db33111b493f116e /runtime | |
parent | 448f2eeea247fe4bf7bbbc982fb6df0f7a1b72f9 (diff) | |
download | rsyslog-63446424c057f527c9c17be7e06f306a130789b4.tar.gz rsyslog-63446424c057f527c9c17be7e06f306a130789b4.tar.xz rsyslog-63446424c057f527c9c17be7e06f306a130789b4.zip |
fixing minor memory leaks
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/modules.c | 4 | ||||
-rw-r--r-- | runtime/rsconf.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/runtime/modules.c b/runtime/modules.c index f6b4bad9..0f132bdf 100644 --- a/runtime/modules.c +++ b/runtime/modules.c @@ -240,8 +240,8 @@ static rsRetVal moduleConstruct(modInfo_t **pThis) static void moduleDestruct(modInfo_t *pThis) { assert(pThis != NULL); - if(pThis->pszName != NULL) - free(pThis->pszName); + free(pThis->pszName); + free(pThis->cnfName); if(pThis->pModHdlr != NULL) { # ifdef VALGRIND # warning "dlclose disabled for valgrind" diff --git a/runtime/rsconf.c b/runtime/rsconf.c index 4fe17534..f93bd7bc 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -417,26 +417,26 @@ void cnfDoRule(struct cnfrule *cnfrule) finalize_it: //TODO: do something with error states - ; + cnfruleDestruct(cnfrule); } void cnfDoCfsysline(char *ln) { - dbgprintf("cnf:global:cfsysline: %s\n", ln); + DBGPRINTF("cnf:global:cfsysline: %s\n", ln); /* the legacy system needs the "$" stripped */ conf.cfsysline((uchar*) ln+1); - dbgprintf("cnf:cfsysline call done\n"); + free(ln); /* cfsysline is just a simple string */ } void cnfDoBSDTag(char *ln) { - dbgprintf("cnf:global:BSD tag: %s\n", ln); + DBGPRINTF("cnf:global:BSD tag: %s\n", ln); cflineProcessTagSelector((uchar**)&ln); } void cnfDoBSDHost(char *ln) { - dbgprintf("cnf:global:BSD host: %s\n", ln); + DBGPRINTF("cnf:global:BSD host: %s\n", ln); cflineProcessHostSelector((uchar**)&ln); } |