diff options
author | Paddy Byers <paddy.byers@gmail.com> | 2014-08-15 22:02:05 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-09-01 10:40:04 +0200 |
commit | 59ad68ca4f81d20b6189c5627cfcd8fc9ae8b71c (patch) | |
tree | 66262a88e5427576cd967376192d085354c8f0bb | |
parent | 8fb8a474fdbf6cd47a12e0f26e630f06a5ca4b4a (diff) | |
download | redis-59ad68ca4f81d20b6189c5627cfcd8fc9ae8b71c.tar.gz |
Store the length of the static argv when first allocated.
-rw-r--r-- | src/scripting.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scripting.c b/src/scripting.c index 2c4549b70..15bea994a 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -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; |