]> git.saurik.com Git - redis.git/commitdiff
If aeApiCreate() fails, there's probably not much one can do, but in the name of...
authorMukund Sivaraman <muks@banu.com>
Wed, 25 Jan 2012 09:27:37 +0000 (10:27 +0100)
committerantirez <antirez@gmail.com>
Wed, 25 Jan 2012 09:27:37 +0000 (10:27 +0100)
src/ae.c

index 6ddccdf7ee3f231ac276e3f31873676645c67c84..a4037e1d829fe2dbfcd7c6af0f76c11926a0b5d0 100644 (file)
--- a/src/ae.c
+++ b/src/ae.c
@@ -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;
     }