Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
438cfed7
Unverified
Commit
438cfed7
authored
Sep 23, 2024
by
debing.sun
Committed by
GitHub
Sep 23, 2024
Browse files
Replace wrongly free with zfree in redis-cli (#13560)
#13258 Incorrect use of free instead of zfree
parent
3a3cacfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
438cfed7
...
...
@@ -3695,7 +3695,7 @@ static int evalMode(int argc, char **argv) {
int
eval_ldb
=
config
.
eval_ldb
;
/* Save it, may be reverted. */
retval
=
issueCommand
(
argc
+
3
-
got_comma
,
argv2
);
for
(
j
=
0
;
j
<
argc
+
3
-
got_comma
;
j
++
)
sdsfree
(
argv2
[
j
]);
free
(
argv2
);
z
free
(
argv2
);
if
(
eval_ldb
)
{
if
(
!
config
.
eval_ldb
)
{
/* If the debugging session ended immediately, there was an
...
...
tests/integration/redis-cli.tcl
View file @
438cfed7
...
...
@@ -808,6 +808,12 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
assert_equal 3
[
exec
{*}
$cmdline
ZCARD new_zset
]
assert_equal
"a
\n
1
\n
b
\n
2
\n
c
\n
3"
[
exec
{*}
$cmdline
ZRANGE new_zset 0 -1 WITHSCORES
]
}
test
"Send eval command by using --eval option"
{
set tmpfile
[
write_tmpfile
{
return ARGV
[
1
]}]
set cmdline
[
rediscli
[
srv host
]
[
srv port
]]
assert_equal
"foo"
[
exec
{*}
$cmdline
--eval $tmpfile , foo
]
}
}
start_server
{
tags
{
"cli external:skip"
}}
{
...
...
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