fix leak in cron
Former-commit-id: c1f4e344bdaf21bc74fae6e1b0cb7fc1ce687e62
This commit is contained in:
parent
36f497a1a5
commit
96c5ffdc86
@ -130,7 +130,9 @@ struct aeCommand
|
||||
void *clientData;
|
||||
aeCommandControl *pctl;
|
||||
};
|
||||
#ifdef PIPE_BUF
|
||||
static_assert(sizeof(aeCommand) <= PIPE_BUF);
|
||||
#endif
|
||||
|
||||
void aeProcessCmd(aeEventLoop *eventLoop, int fd, void *, int )
|
||||
{
|
||||
|
@ -67,6 +67,7 @@ void cronCommand(client *c)
|
||||
|
||||
robj *o = createObject(OBJ_CRON, spjob.release());
|
||||
setKey(c->db, c->argv[ARG_NAME], o);
|
||||
decrRefCount(o);
|
||||
// use an expire to trigger execution. Note: We use a subkey expire here so legacy clients don't delete it.
|
||||
setExpire(c, c->db, c->argv[ARG_NAME], c->argv[ARG_NAME], base + interval);
|
||||
addReply(c, shared.ok);
|
||||
@ -102,7 +103,7 @@ void executeCronJobExpireHook(const char *key, robj *o)
|
||||
int dbId = job->dbNum;
|
||||
if (job->fSingleShot)
|
||||
{
|
||||
dbSyncDelete(cFake->db, keyobj);
|
||||
serverAssert(dbSyncDelete(cFake->db, keyobj));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user