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
d4a4375d
Commit
d4a4375d
authored
Dec 05, 2018
by
antirez
Browse files
RESP3: hiredis: free map and set replies.
parent
eb3c5a70
Changes
1
Hide whitespace changes
Inline
Side-by-side
deps/hiredis/hiredis.c
View file @
d4a4375d
...
...
@@ -82,6 +82,8 @@ void freeReplyObject(void *reply) {
case
REDIS_REPLY_INTEGER
:
break
;
/* Nothing to free */
case
REDIS_REPLY_ARRAY
:
case
REDIS_REPLY_MAP
:
case
REDIS_REPLY_SET
:
if
(
r
->
element
!=
NULL
)
{
for
(
j
=
0
;
j
<
r
->
elements
;
j
++
)
freeReplyObject
(
r
->
element
[
j
]);
...
...
@@ -134,7 +136,7 @@ static void *createStringObject(const redisReadTask *task, char *str, size_t len
static
void
*
createArrayObject
(
const
redisReadTask
*
task
,
int
elements
)
{
redisReply
*
r
,
*
parent
;
r
=
createReplyObject
(
REDIS_REPLY_ARRAY
);
r
=
createReplyObject
(
task
->
type
);
if
(
r
==
NULL
)
return
NULL
;
...
...
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