diff --git a/common/utils/threadPool/thread-pool.c b/common/utils/threadPool/thread-pool.c index b351a667b5..f0f4769faf 100644 --- a/common/utils/threadPool/thread-pool.c +++ b/common/utils/threadPool/thread-pool.c @@ -98,6 +98,8 @@ void *one_thread(void *arg) { myThread->runningOnKey=-1; mutexunlock(tp->incomingFifo.lockF); } + else + delNotifiedFIFO_elt(elt); } while (!myThread->terminate); return NULL; } diff --git a/common/utils/threadPool/thread-pool.h b/common/utils/threadPool/thread-pool.h index 0c544e5b0f..b06671c728 100644 --- a/common/utils/threadPool/thread-pool.h +++ b/common/utils/threadPool/thread-pool.h @@ -279,6 +279,8 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) { if (msg->reponseFifo) pushNotifiedFIFO(msg->reponseFifo, msg); + else + delNotifiedFIFO_elt(msg); } }