From 86cde329d16c3f69555a21a8155e998e1d91ab08 Mon Sep 17 00:00:00 2001 From: Paddy Byers Date: Fri, 15 Aug 2014 22:02:05 +0100 Subject: [PATCH] Store the length of the static argv when first allocated. --- src/scripting.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripting.c b/src/scripting.c index a0c88742f..50e1ef10c 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;