From: W.C.A. Wijngaards Date: Thu, 25 Jun 2020 14:29:37 +0000 (+0200) Subject: outnet_tcp_cb: add assertion and return when write packets done is handled. X-Git-Tag: release-1.13.0rc1~5^2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfb6d32189c98810b2ded91a644868deb78739f2;p=thirdparty%2Funbound.git outnet_tcp_cb: add assertion and return when write packets done is handled. --- diff --git a/services/outside_network.c b/services/outside_network.c index dad448b52..71a7adebd 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -867,6 +867,7 @@ outnet_tcp_cb(struct comm_point* c, void* arg, int error, pend->c->tcp_write_pkt = NULL; pend->c->tcp_write_pkt_len = 0; /* the pend.query is already in tree_by_id */ + log_assert(pend->query->id_node.key); pend->query = NULL; /* setup to write next packet or setup read timeout */ if(pend->reuse.write_wait_first) { @@ -876,6 +877,7 @@ outnet_tcp_cb(struct comm_point* c, void* arg, int error, } else { reuse_tcp_setup_readtimeout(pend); } + return 0; } else if(error != NETEVENT_NOERROR) { verbose(VERB_QUERY, "outnettcp got tcp error %d", error); /* pass error below and exit */