From 9ea8399fd73cced96c9337f014ae0dc58044e77b Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 11 Jul 2007 16:06:46 +0000 Subject: fixed a bug that caused rsyslogd to segfault when TCP listening was disabled and it terminated --- ChangeLog | 2 ++ syslogd.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f59e981..55fe88df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ Version 1.16.0 (RGer/Peter Vrabec), 2007-07-1? - build system switched to autotools - removed SYSV preprocessor macro use, replaced with autotools equivalents +- fixed a bug that caused rsyslogd to segfault when TCP listening was + disabled and it terminated --------------------------------------------------------------------------- Version 1.15.1 (RGer), 2007-07-10 - fixed a bug that caused a dynaFile selector to stall when there was diff --git a/syslogd.c b/syslogd.c index fccca9ed..831d9482 100644 --- a/syslogd.c +++ b/syslogd.c @@ -7041,9 +7041,8 @@ static void die(int sig) close(funix[i]); /* Close the UDP inet socket. */ closeUDPListenSockets(); - /* Close the TCP inet socket. */ - if(*sockTCPLstn) { + if(sockTCPLstn != NULL && *sockTCPLstn) { deinit_tcp_listener(); } #endif -- cgit v1.2.3