Commit b67d2345 authored by antirez's avatar antirez
Browse files

Fixed a crash loading the AOF file containing MULTI/EXEC, a result of WATCH...

Fixed a crash loading the AOF file containing MULTI/EXEC, a result of WATCH implementation. Test needed...
parent b7a8daef
...@@ -194,6 +194,7 @@ struct redisClient *createFakeClient(void) { ...@@ -194,6 +194,7 @@ struct redisClient *createFakeClient(void) {
* so that Redis will not try to send replies to this client. */ * so that Redis will not try to send replies to this client. */
c->replstate = REDIS_REPL_WAIT_BGSAVE_START; c->replstate = REDIS_REPL_WAIT_BGSAVE_START;
c->reply = listCreate(); c->reply = listCreate();
c->watched_keys = listCreate();
listSetFreeMethod(c->reply,decrRefCount); listSetFreeMethod(c->reply,decrRefCount);
listSetDupMethod(c->reply,dupClientReplyValue); listSetDupMethod(c->reply,dupClientReplyValue);
initClientMultiState(c); initClientMultiState(c);
...@@ -203,6 +204,7 @@ struct redisClient *createFakeClient(void) { ...@@ -203,6 +204,7 @@ struct redisClient *createFakeClient(void) {
void freeFakeClient(struct redisClient *c) { void freeFakeClient(struct redisClient *c) {
sdsfree(c->querybuf); sdsfree(c->querybuf);
listRelease(c->reply); listRelease(c->reply);
listRelease(c->watched_keys);
freeClientMultiState(c); freeClientMultiState(c);
zfree(c); zfree(c);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment