mirror of
https://github.com/fluencelabs/redis
synced 2025-04-08 18:38:04 +00:00
lpush arguments vector rewrite modified for more speed and to memory leak removal.
This commit is contained in:
parent
b67feecacd
commit
cd8bdea31b
@ -296,8 +296,8 @@ void pushGenericCommand(redisClient *c, int where) {
|
|||||||
* be propagated). */
|
* be propagated). */
|
||||||
if (waiting && pushed) {
|
if (waiting && pushed) {
|
||||||
/* CMD KEY a b C D E */
|
/* CMD KEY a b C D E */
|
||||||
for (j = 2; j < pushed+2; j++)
|
for (j = 0; j < waiting; j++) decrRefCount(c->argv[j+2]);
|
||||||
rewriteClientCommandArgument(c,j,c->argv[j+waiting]);
|
memmove(c->argv+2,c->argv+2+waiting,sizeof(robj*)*pushed);
|
||||||
c->argc -= waiting;
|
c->argc -= waiting;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user