]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
request->home_server may be NULL
authorAlan T. DeKok <aland@freeradius.org>
Tue, 15 Jan 2019 19:29:26 +0000 (14:29 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 15 Jan 2019 19:29:26 +0000 (14:29 -0500)
src/main/process.c

index 5b71e5268d296c80ebddecae7b57312ee2512f8a..9849a6c83fbeaf38c15a860d0a58a03943d5c6be 100644 (file)
@@ -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;
                }