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
5fa6f9eb
Unverified
Commit
5fa6f9eb
authored
May 08, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
May 08, 2020
Browse files
Merge pull request #7204 from ShooterIT/benchmark-fix
Redis Benchmark: Fix coredump because of double free
parents
e17f9311
150ba0e1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
5fa6f9eb
...
@@ -279,7 +279,7 @@ static redisConfig *getRedisConfig(const char *ip, int port,
...
@@ -279,7 +279,7 @@ static redisConfig *getRedisConfig(const char *ip, int port,
for
(;
i
<
2
;
i
++
)
{
for
(;
i
<
2
;
i
++
)
{
int
res
=
redisGetReply
(
c
,
&
r
);
int
res
=
redisGetReply
(
c
,
&
r
);
if
(
reply
)
freeReplyObject
(
reply
);
if
(
reply
)
freeReplyObject
(
reply
);
reply
=
((
redisReply
*
)
r
);
reply
=
res
==
REDIS_OK
?
((
redisReply
*
)
r
)
:
NULL
;
if
(
res
!=
REDIS_OK
||
!
r
)
goto
fail
;
if
(
res
!=
REDIS_OK
||
!
r
)
goto
fail
;
if
(
reply
->
type
==
REDIS_REPLY_ERROR
)
{
if
(
reply
->
type
==
REDIS_REPLY_ERROR
)
{
fprintf
(
stderr
,
"ERROR: %s
\n
"
,
reply
->
str
);
fprintf
(
stderr
,
"ERROR: %s
\n
"
,
reply
->
str
);
...
...
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