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 --- syslogd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'syslogd.c') 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