Store the length of the static argv when first allocated.

This commit is contained in:
Paddy Byers 2014-08-15 22:02:05 +01:00 committed by antirez
parent 91e6b4d74e
commit 86cde329d1

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;