mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-04 17:24:47 -04:00
Address use before NULL check warning of uvreq
move dereference of uvreq until the after NULL check.
(cherry picked from commit 7079829b84)
This commit is contained in:
parent
3859fea828
commit
addd580b0a
1 changed files with 4 additions and 2 deletions
|
|
@ -2585,8 +2585,7 @@ isc__nm_async_readcb(isc__networker_t *worker, isc__netievent_t *ev0) {
|
|||
isc_nmsocket_t *sock = ievent->sock;
|
||||
isc__nm_uvreq_t *uvreq = ievent->req;
|
||||
isc_result_t eresult = ievent->result;
|
||||
isc_region_t region = { .base = (unsigned char *)uvreq->uvbuf.base,
|
||||
.length = uvreq->uvbuf.len };
|
||||
isc_region_t region;
|
||||
|
||||
UNUSED(worker);
|
||||
|
||||
|
|
@ -2595,6 +2594,9 @@ isc__nm_async_readcb(isc__networker_t *worker, isc__netievent_t *ev0) {
|
|||
REQUIRE(VALID_NMHANDLE(uvreq->handle));
|
||||
REQUIRE(sock->tid == isc_nm_tid());
|
||||
|
||||
region.base = (unsigned char *)uvreq->uvbuf.base;
|
||||
region.length = uvreq->uvbuf.len;
|
||||
|
||||
uvreq->cb.recv(uvreq->handle, eresult, ®ion, uvreq->cbarg);
|
||||
|
||||
isc__nm_uvreq_put(&uvreq, sock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue