fixed memory leak in thread pools
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 16 Aug 2016 09:30:41 +0000 (12:30 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 16 Aug 2016 09:30:41 +0000 (12:30 +0300)
src/libnetxms/tp.cpp

index 0850fc3..abfc7e8 100644 (file)
@@ -232,6 +232,7 @@ void LIBNETXMS_EXPORTABLE ThreadPoolDestroy(ThreadPool *p)
 
    ConditionSet(p->maintThreadStop);
    ThreadJoin(p->maintThread);
 
    ConditionSet(p->maintThreadStop);
    ThreadJoin(p->maintThread);
+   ConditionDestroy(p->maintThreadStop);
 
    WorkRequest rq;
    rq.func = NULL;
 
    WorkRequest rq;
    rq.func = NULL;