From: Matthew Newton Date: Tue, 8 Aug 2023 18:43:50 +0000 (+0100) Subject: don't leave dangling pointer to a cancelled coa request X-Git-Tag: release_3_2_4~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9012b709ebd21870467cf8069326f05761296bd3;p=thirdparty%2Ffreeradius-server.git don't leave dangling pointer to a cancelled coa request --- diff --git a/src/main/process.c b/src/main/process.c index d143aae0a62..c18894cc098 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -3387,7 +3387,11 @@ do_home: * Once we've decided to proxy a request, we cannot send * a CoA packet. So we free up any CoA packet here. */ - if (request->coa) request_done(request->coa, FR_ACTION_COA_CANCELLED); + if (request->coa) { + RWDEBUG("Cannot proxy and originate CoA packets at the same time. Cancelling CoA request"); + request_done(request->coa, FR_ACTION_COA_CANCELLED); + request->coa = NULL; + } #endif /* @@ -3619,6 +3623,7 @@ static int request_proxy(REQUEST *request) if (request->coa) { RWDEBUG("Cannot proxy and originate CoA packets at the same time. Cancelling CoA request"); request_done(request->coa, FR_ACTION_COA_CANCELLED); + request->coa = NULL; } #endif