From 09dd5c92bb343b7dc9c93d3eff57cc004d57adc7 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Oct 2008 16:02:30 +0200 Subject: fixed memory leaks - a big one in syslogd.c, which caused messages not to be freed when compiled for single-threading mode - a small one in the file output handler, outchannels, when a size-reached action was to be executed --- syslogd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index afcc3b92..98e7d7ba 100644 --- a/syslogd.c +++ b/syslogd.c @@ -2784,7 +2784,6 @@ static void *singleWorker() * rgerhards, 2005-10-24 */ #ifndef USE_PTHREADS -#define enqueueMsg(x) processMsg((x)) #else static void enqueueMsg(msg_t *pMsg) { @@ -3299,7 +3298,12 @@ logmsg(int pri, msg_t *pMsg, int flags) */ pMsg->msgFlags = flags; +#ifndef USE_PTHREADS + processMsg(pMsg); + MsgDestruct(pMsg); +#else /* ifdef USE_PTHREADS */ enqueueMsg(pMsg); +#endif } -- cgit v1.2.3