If aeApiCreate() fails, there's probably not much one can do, but in the name of consistency...

This commit is contained in:
Mukund Sivaraman 2012-01-25 10:27:37 +01:00 committed by antirez
parent b362c111da
commit caa63a3821

View File

@ -74,6 +74,8 @@ aeEventLoop *aeCreateEventLoop(int setsize) {
eventLoop->maxfd = -1;
eventLoop->beforesleep = NULL;
if (aeApiCreate(eventLoop) == -1) {
zfree(eventLoop->events);
zfree(eventLoop->fired);
zfree(eventLoop);
return NULL;
}