From: Alan T. DeKok Date: Tue, 24 Oct 2017 20:01:20 +0000 (-0400) Subject: delete only if they're in the heaps X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec5282956462ec260263be55672265e553427f13;p=thirdparty%2Ffreeradius-server.git delete only if they're in the heaps --- diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index 8ac423b67a9..4ca3d50bf75 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -543,8 +543,8 @@ static void fr_worker_send_reply(fr_worker_t *worker, REQUEST *request, size_t s * @todo Use a talloc pool for the request. Clean it up, * and insert it back into a slab allocator. */ - (void) fr_heap_extract(worker->time_order, request); - (void) rbtree_deletebydata(worker->dedup, request); + if (request->time_order_id >= 0) (void) fr_heap_extract(worker->time_order, request); + if (request->runnable_id >= 0) (void) fr_heap_extract(worker->runnable, request); #ifndef NDEBUG request->async->original_recv_time = NULL;