Store the length of the static argv when first allocated.
This commit is contained in:
parent
91e6b4d74e
commit
86cde329d1
@ -224,6 +224,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
|
||||
/* Build the arguments vector */
|
||||
if (!argv) {
|
||||
argv = zmalloc(sizeof(robj*)*argc);
|
||||
argv_size = argc;
|
||||
} else if (argv_size < argc) {
|
||||
argv = zrealloc(argv,sizeof(robj*)*argc);
|
||||
argv_size = argc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user