From 59ad68ca4f81d20b6189c5627cfcd8fc9ae8b71c 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 2c4549b7..15bea994 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;