mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Trim excess SDS allocation in inline command parsing
This commit is contained in:
parent
368786ead5
commit
24c18b1034
1 changed files with 2 additions and 0 deletions
|
|
@ -3127,6 +3127,8 @@ int processInlineBuffer(client *c, pendingCommand *pcmd) {
|
|||
|
||||
/* Create redis objects for all arguments. */
|
||||
for (pcmd->argc = 0, j = 0; j < argc; j++) {
|
||||
/* Trim greedy allocation from sdssplitargs(). */
|
||||
argv[j] = sdsRemoveFreeSpace(argv[j], 0);
|
||||
pcmd->argv[pcmd->argc] = createObject(OBJ_STRING,argv[j]);
|
||||
pcmd->argc++;
|
||||
pcmd->argv_len_sum += sdslen(argv[j]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue