From 6313a3417605fff4a40e367954c3fcbf79d321d5 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 30 Jul 2007 10:50:35 +0000 Subject: - fixed a memory leak in syslogd/init() that happend when the config file could not be read - thanks to varmojfekoj for the patch --- syslogd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index 681f7383..8ee890f1 100644 --- a/syslogd.c +++ b/syslogd.c @@ -4038,9 +4038,9 @@ static void init() cfline("*.ERR\t" _PATH_CONSOLE, nextp); nextp->f_next = (selector_t *)calloc(1, sizeof(selector_t)); cfline("*.PANIC\t*", nextp->f_next); - nextp->f_next = (selector_t *)calloc(1, sizeof(selector_t)); + nextp->f_next->f_next = (selector_t *)calloc(1, sizeof(selector_t)); snprintf(cbuf,sizeof(cbuf), "*.*\t%s", ttyname(0)); - cfline(cbuf, nextp->f_next); + cfline(cbuf, nextp->f_next->f_next); Initialized = 1; } else { /* we should consider moving this into a separate function, its lengthy... */ -- cgit