Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
96c7e94d
Commit
96c7e94d
authored
Sep 10, 2014
by
antirez
Browse files
luaRedisGenericCommand() cached argv handling simplified.
As discussed in issue #1945.
parent
0e54d970
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
96c7e94d
...
...
@@ -222,10 +222,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
)
{
if
(
argv_size
<
argc
)
{
argv
=
zrealloc
(
argv
,
sizeof
(
robj
*
)
*
argc
);
argv_size
=
argc
;
}
...
...
@@ -403,6 +400,7 @@ cleanup:
if
(
c
->
argv
!=
argv
)
{
zfree
(
c
->
argv
);
argv
=
NULL
;
argv_size
=
0
;
}
if
(
raise_error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment