summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaddy Byers <paddy.byers@gmail.com>2014-08-15 22:02:05 +0100
committerantirez <antirez@gmail.com>2014-09-01 10:40:04 +0200
commit59ad68ca4f81d20b6189c5627cfcd8fc9ae8b71c (patch)
tree66262a88e5427576cd967376192d085354c8f0bb
parent8fb8a474fdbf6cd47a12e0f26e630f06a5ca4b4a (diff)
downloadredis-59ad68ca4f81d20b6189c5627cfcd8fc9ae8b71c.tar.gz
Store the length of the static argv when first allocated.
-rw-r--r--src/scripting.c1
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;