Store the length of the static argv when first allocated.

This commit is contained in:
Paddy Byers
2014-09-01 10:40:04 +02:00
committed by antirez
parent 8fb8a474fd
commit 59ad68ca4f
+1
View File
@@ -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;