From: Alan T. DeKok Date: Tue, 15 Jan 2019 19:29:26 +0000 (-0500) Subject: request->home_server may be NULL X-Git-Tag: release_3_0_18~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a810df143b25bcc89fb052c314afa97072e3c0ba;p=thirdparty%2Ffreeradius-server.git request->home_server may be NULL --- diff --git a/src/main/process.c b/src/main/process.c index 5b71e5268d2..9849a6c83fb 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -4466,6 +4466,7 @@ static bool coa_max_time(REQUEST *request) #ifdef DEBUG_STATE_MACHINE int action = FR_ACTION_TIMER; #endif + int mrd; VERIFY_REQUEST(request); @@ -4497,10 +4498,11 @@ static bool coa_max_time(REQUEST *request) fr_event_now(el, &now); when = request->proxy->timestamp; if (request->home_server && (request->process != coa_running)) { - when.tv_sec += request->home_server->coa_mrd; + mrd = request->home_server->coa_mrd; } else { - when.tv_sec += request->root->max_request_time; + mrd = request->root->max_request_time; } + when.tv_sec += mrd; /* * Taking too long: tell it to die. @@ -4515,7 +4517,7 @@ static bool coa_max_time(REQUEST *request) &request->proxy->dst_ipaddr.ipaddr, buffer, sizeof(buffer)), request->proxy->dst_port, - request->home_server->coa_mrd); + mrd); goto done; }