This commit is contained in:
Michael Davidsaver
2012-05-24 14:31:28 -04:00
parent 6060f2eaaa
commit 3333217f56
3 changed files with 8 additions and 10 deletions

View File

@@ -135,15 +135,14 @@ getEventNode(epicsMessageQueueId pmsg)
evp = reinterpret_cast < struct eventNode * > ( ellGet(&pmsg->eventFreeList) );
if (evp == NULL) {
epicsEventId eid = epicsEventCreate(epicsEventEmpty);
evp = (struct eventNode *) calloc(1, sizeof(*evp));
if(!evp || !eid) {
if(!evp)
return NULL;
evp->event = epicsEventCreate(epicsEventEmpty);
if(!evp->event) {
free(evp);
if(eid)
epicsEventDestroy(eid);
return NULL;
}
evp->event = eid;
}
return evp;
}