* As the request has no parent, then there's nothing to free it
* so we have to.
*/
-static void _worker_request_done_detached(request_t *request, UNUSED rlm_rcode_t rcode, UNUSED void *uctx)
+static void _worker_request_done_detached(request_t *request, UNUSED rlm_rcode_t rcode, void *uctx)
{
+ fr_worker_t *worker = talloc_get_type_abort(uctx, fr_worker_t);
+
/*
* No time tracking for detached requests
* so we don't need to call
* order heap, but we need to do that for
* detached requests.
*/
- if (fr_heap_entry_inserted(request->time_order_id)) (void) fr_heap_extract(worker->time_order, request);
+ (void)fr_heap_extract(worker->time_order, request);
/*
* Detached requests have to be freed by us