From 2b487ceb72281af8f125babdd8128101f93d792e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 25 Jul 2007 07:07:16 +0000 Subject: fixed a bug that caused rsyslogd to segfault on exit (and probably also on HUP), when there was an unsent message in a selector that required forwarding and the dns lookup failed for that selector (yes, it was pretty unlikely to happen;)) thanks to varmojfekoj for the patch --- syslogd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index de588412..45423b36 100644 --- a/syslogd.c +++ b/syslogd.c @@ -4100,7 +4100,11 @@ static void freeSelectors(void) f = Files; while (f != NULL) { /* flush any pending output */ - if (f->f_prevcount) { + /* TODO: the output module must handle this internally in the + * future - implement it when moving f_type out of selector_t + * rgerhards, 2007-07-24 + */ + if(f->f_type != F_FORW_UNKN && f->f_prevcount) { fprintlog(f); } -- cgit v1.2.3