summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-18 10:49:27 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-18 10:49:27 +0000
commit48c0c81132fe0b4aadf46fd54fc5acd61bfbeffa (patch)
tree7cc726aed7393ecdb22be545dbe8b3c400deb8d4 /syslogd.c
parent7a2eb66a0a0fde6ed263a035eb2eeeba483c604b (diff)
downloadrsyslog-48c0c81132fe0b4aadf46fd54fc5acd61bfbeffa.tar.gz
rsyslog-48c0c81132fe0b4aadf46fd54fc5acd61bfbeffa.tar.xz
rsyslog-48c0c81132fe0b4aadf46fd54fc5acd61bfbeffa.zip
fixed minimal memory leak on HUP (caused by templates) thanks to
varmojfekoj for the patch
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/syslogd.c b/syslogd.c
index 2c05b0cc..6164d25a 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -7913,6 +7913,9 @@ static void init()
/* Reflect the deletion of the Files linked list. */
Files = NULL;
}
+
+ dprintf("Clearing templates.\n");
+ tplDeleteNew();
f = NULL;
nextp = NULL;
@@ -10233,7 +10236,7 @@ int main(int argc, char **argv)
pTmp = template_StdUsrMsgFmt;
tplAddLine(" StdUsrMsgFmt", &pTmp);
pTmp = template_StdDBFmt;
- tplAddLine(" StdDBFmt", &pTmp);
+ tplLastStaticInit(tplAddLine(" StdDBFmt", &pTmp));
/* prepare emergency logging system */