summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-11 16:06:46 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-11 16:06:46 +0000
commit9ea8399fd73cced96c9337f014ae0dc58044e77b (patch)
tree56829667b8252b4aa513e1371641dbe9a8699b49 /syslogd.c
parent1c133d93514914c2592d94d385d3b71f7667e5eb (diff)
downloadrsyslog-9ea8399fd73cced96c9337f014ae0dc58044e77b.tar.gz
rsyslog-9ea8399fd73cced96c9337f014ae0dc58044e77b.tar.xz
rsyslog-9ea8399fd73cced96c9337f014ae0dc58044e77b.zip
fixed a bug that caused rsyslogd to segfault when TCP listening was
disabled and it terminated
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c3
1 files changed, 1 insertions, 2 deletions
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