X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/96ffb2fe97c3e77879e7a4f6f7457397a18bf233..5b2500965684fbcf75cb88152394f0e853661867:/src/ae_kqueue.c diff --git a/src/ae_kqueue.c b/src/ae_kqueue.c index 04c3536b..6bf64f4e 100644 --- a/src/ae_kqueue.c +++ b/src/ae_kqueue.c @@ -16,7 +16,10 @@ static int aeApiCreate(aeEventLoop *eventLoop) { if (!state) return -1; state->kqfd = kqueue(); - if (state->kqfd == -1) return -1; + if (state->kqfd == -1) { + zfree(state); + return -1; + } eventLoop->apidata = state; return 0;