From 48c0c81132fe0b4aadf46fd54fc5acd61bfbeffa Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 18 Jul 2007 10:49:27 +0000 Subject: fixed minimal memory leak on HUP (caused by templates) thanks to varmojfekoj for the patch --- syslogd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'syslogd.c') 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 */ -- cgit