mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Perform request validation in req_response() before using the pointer
The 'request' pointer is used before it is checked. Perform the check
before using the pointer.
(cherry picked from commit 5b37359697)
This commit is contained in:
parent
4dc2ff79d6
commit
14084d8eac
1 changed files with 2 additions and 2 deletions
|
|
@ -1057,6 +1057,8 @@ req_response(isc_result_t result, isc_region_t *region, void *arg) {
|
|||
req_log(ISC_LOG_DEBUG(3), "req_response: request %p: %s", request,
|
||||
isc_result_totext(result));
|
||||
|
||||
REQUIRE(VALID_REQUEST(request));
|
||||
|
||||
if (result == ISC_R_TIMEDOUT) {
|
||||
LOCK(&request->requestmgr->locks[request->hash]);
|
||||
if (request->udpcount > 1) {
|
||||
|
|
@ -1074,8 +1076,6 @@ req_response(isc_result_t result, isc_region_t *region, void *arg) {
|
|||
goto done;
|
||||
}
|
||||
|
||||
REQUIRE(VALID_REQUEST(request));
|
||||
|
||||
LOCK(&request->requestmgr->locks[request->hash]);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue