Address use before NULL check warning of ievent->sock

Reorder REQUIRE checks to ensure ievent->sock is checked earlier

(cherry picked from commit 8fc9bb8e8e)
This commit is contained in:
Mark Andrews 2021-09-28 10:12:31 +10:00
parent addd580b0a
commit 5dff412a08

View file

@ -1110,10 +1110,9 @@ isc__nm_async_tcpdnssend(isc__networker_t *worker, isc__netievent_t *ev0) {
isc__netievent_tcpdnssend_t *ievent =
(isc__netievent_tcpdnssend_t *)ev0;
REQUIRE(ievent->sock->type == isc_nm_tcpdnssocket);
REQUIRE(ievent->sock->tid == isc_nm_tid());
REQUIRE(VALID_NMSOCK(ievent->sock));
REQUIRE(VALID_UVREQ(ievent->req));
REQUIRE(VALID_NMSOCK(ievent->sock));
REQUIRE(ievent->sock->type == isc_nm_tcpdnssocket);
REQUIRE(ievent->sock->tid == isc_nm_tid());
isc_result_t result;