]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Actually need a worker pointer...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Apr 2021 21:51:48 +0000 (22:51 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Apr 2021 21:51:48 +0000 (22:51 +0100)
src/lib/io/worker.c

index d927307bcdd006f1723baca7f6931ea44ec49c80..9356b5bf17aa4102f046ec305e2f0418b84e0c7d 100644 (file)
@@ -996,8 +996,10 @@ static void _worker_request_done_internal(request_t *request, UNUSED rlm_rcode_t
  * 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
@@ -1011,7 +1013,7 @@ static void _worker_request_done_detached(request_t *request, UNUSED rlm_rcode_t
         *      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