summaryrefslogtreecommitdiff
path: root/src/t_list.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-02-29 13:38:30 +0100
committerantirez <antirez@gmail.com>2012-02-29 13:38:30 +0100
commitcd8bdea31bdd682c811276a56515b65268f42958 (patch)
tree070b40efc19e7876a35b71087b4d6d325c09dbd8 /src/t_list.c
parentb67feecacd94165a76da6af3a8c4e735f01729b0 (diff)
downloadredis-cd8bdea31bdd682c811276a56515b65268f42958.tar.gz
lpush arguments vector rewrite modified for more speed and to memory leak removal.
Diffstat (limited to 'src/t_list.c')
-rw-r--r--src/t_list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/t_list.c b/src/t_list.c
index 636c556c2..d6e28b7e5 100644
--- a/src/t_list.c
+++ b/src/t_list.c
@@ -296,8 +296,8 @@ void pushGenericCommand(redisClient *c, int where) {
* be propagated). */
if (waiting && pushed) {
/* CMD KEY a b C D E */
- for (j = 2; j < pushed+2; j++)
- rewriteClientCommandArgument(c,j,c->argv[j+waiting]);
+ for (j = 0; j < waiting; j++) decrRefCount(c->argv[j+2]);
+ memmove(c->argv+2,c->argv+2+waiting,sizeof(robj*)*pushed);
c->argc -= waiting;
}
}