From: Alan T. DeKok Date: Fri, 20 Oct 2017 17:13:37 +0000 (-0400) Subject: don't insert into the heap multiple times X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ab3a28bd938c4e55606bfbc10b7bf00ab15b520;p=thirdparty%2Ffreeradius-server.git don't insert into the heap multiple times --- diff --git a/src/main/unlang_interpret.c b/src/main/unlang_interpret.c index 9114e7af80f..7b16bd29690 100644 --- a/src/main/unlang_interpret.c +++ b/src/main/unlang_interpret.c @@ -2843,7 +2843,12 @@ void unlang_resumable(REQUEST *request) #endif rad_assert(request->backlog != NULL); - fr_heap_insert(request->backlog, request); + + /* + * Multiple child request may mark a request runnable, + * before it is enabled for running. + */ + if (request->runnable_id < 0) fr_heap_insert(request->backlog, request); } /** Send a signal (usually stop) to a request