]> git.saurik.com Git - redis.git/blobdiff - src/ae_epoll.c
Lists AOF rewrite using variadic RPUSH (work in progress)
[redis.git] / src / ae_epoll.c
index d48977b6533c689f3b89e814a5bdd4b94855946b..5680b6a2767617319e1d07732530553d1eb2457b 100644 (file)
@@ -14,7 +14,10 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
 
     if (!state) return -1;
     state->epfd = epoll_create(1024); /* 1024 is just an hint for the kernel */
-    if (state->epfd == -1) return -1;
+    if (state->epfd == -1) {
+        zfree(state);
+        return -1;
+    }
     eventLoop->apidata = state;
     return 0;
 }