summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-12-11 14:26:41 +0100
committerantirez <antirez@gmail.com>2015-12-13 10:17:33 +0100
commit32e940c08430c1ff4e24a57999414511a15ebaaf (patch)
tree33ef524d0b59048da3bf48729c9c86ec77d563cd
parentc460458d5766fdfd06dee5cb05f886681813209d (diff)
downloadredis-32e940c08430c1ff4e24a57999414511a15ebaaf.tar.gz
MIGRATE: Fix new argument rewriting refcount handling.
-rw-r--r--src/cluster.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cluster.c b/src/cluster.c
index c49fc32f3..05d7baa6c 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -4760,8 +4760,6 @@ try_again:
}
} else {
if (!copy) {
- robj *aux;
-
/* No COPY option: remove the local key, signal the change. */
dbDelete(c->db,kv[j]);
signalModifiedKey(c->db,kv[j]);
@@ -4769,6 +4767,7 @@ try_again:
/* Populate the argument vector to replace the old one. */
newargv[del_idx++] = kv[j];
+ incrRefCount(kv[j]);
}
}
}
@@ -4777,7 +4776,7 @@ try_again:
/* Translate MIGRATE as DEL for replication/AOF. */
if (del_idx > 1) {
newargv[0] = createStringObject("DEL",3);
- replaceClientCommandVector(c,newargv,del_idx);
+ replaceClientCommandVector(c,del_idx,newargv);
} else {
/* No key transfer acknowledged, no need to rewrite as DEL. */
zfree(newargv);