diff --git a/src/ae_kqueue.c b/src/ae_kqueue.c index 182635a76..e1d09e7e6 100644 --- a/src/ae_kqueue.c +++ b/src/ae_kqueue.c @@ -75,7 +75,7 @@ static int aeApiCreate(aeEventLoop *eventLoop) { return -1; } anetCloexec(state->kqfd); - state->eventsMask = zmalloc(EVENT_MASK_MALLOC_SIZE(eventLoop->setsize), MALLOC_LOCAL); + state->eventsMask = (char*)zmalloc(EVENT_MASK_MALLOC_SIZE(eventLoop->setsize), MALLOC_LOCAL); memset(state->eventsMask, 0, EVENT_MASK_MALLOC_SIZE(eventLoop->setsize)); eventLoop->apidata = state; return 0; diff --git a/src/rdb.cpp b/src/rdb.cpp index 2e96aa3ac..dfeaaa54b 100644 --- a/src/rdb.cpp +++ b/src/rdb.cpp @@ -2798,6 +2798,7 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi) { key = nullptr; } else { sdsfree(key); + key = nullptr; goto eoferr; } } else { diff --git a/src/server.cpp b/src/server.cpp index ebdb987e7..7dc38179a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -4004,12 +4004,9 @@ void call(client *c, int flags) { /* Call the command. */ dirty = g_pserver->dirty; prev_err_count = g_pserver->stat_total_error_replies; + g_pserver->fixed_time_expire++; - /* Update cache time, in case we have nested calls we want to - * update only on the first call*/ - if (g_pserver->fixed_time_expire++ == 0) { - updateCachedTime(0); - } + updateCachedTime(0); incrementMvccTstamp(); elapsedStart(&call_timer); try {