dbNotify: cleanup freelist

This commit is contained in:
Michael Davidsaver
2015-03-13 15:24:07 -04:00
parent a014314384
commit a7a87372aa
+10 -1
View File
@@ -109,6 +109,15 @@ static void notifyCallback(CALLBACK *pcallback);
(listnode)->isOnList=0; \
}
static void notifyFree(void *raw)
{
notifyPvt *pnotifyPvt = raw;
assert(pnotifyPvt->magic==MAGIC);
epicsEventDestroy(pnotifyPvt->cancelEvent);
epicsEventDestroy(pnotifyPvt->userCallbackEvent);
free(pnotifyPvt);
}
static void notifyInit(processNotify *ppn)
{
notifyPvt *pnotifyPvt;
@@ -301,7 +310,7 @@ static void notifyCallback(CALLBACK *pcallback)
void dbProcessNotifyExit(void)
{
assert(ellCount(&pnotifyGlobal->freeList)==0);
ellFree2(&pnotifyGlobal->freeList, &notifyFree);
epicsMutexDestroy(pnotifyGlobal->lock);
free(pnotifyGlobal);
pnotifyGlobal = NULL;