From: Wouter Wijngaards Date: Thu, 20 Nov 2008 08:06:05 +0000 (+0000) Subject: fixup tcp accept. X-Git-Tag: release-1.1.1~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e25608d1be0ffc3d9227230ff2ee27145e0e74ca;p=thirdparty%2Funbound.git fixup tcp accept. git-svn-id: file:///svn/unbound/trunk@1364 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 4963a3b39..6a0eeca86 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +20 November 2008: Wouter + - fixup fatal error due to faulty error checking after tcp accept. + 19 November 2008: Wouter - bug #219: fixed so that syslog which delays opening until the first log line is written, gets a log line while not chroot'ed yet. diff --git a/util/netevent.c b/util/netevent.c index 390a00ec6..056183656 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -605,6 +605,8 @@ comm_point_tcp_accept_callback(int fd, short event, void* arg) log_assert(fd != -1); new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.addr, &c_hdl->repinfo.addrlen); + if(new_fd == -1) + return; /* grab the tcp handler buffers */ c->tcp_free = c_hdl->tcp_free;