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
hiredis
Commits
e7aa0b4b
Commit
e7aa0b4b
authored
Aug 30, 2010
by
antirez
Browse files
memory leak resolved in redisReadIntegerReply
parent
4b5f030d
Changes
1
Hide whitespace changes
Inline
Side-by-side
hiredis.c
View file @
e7aa0b4b
...
...
@@ -126,7 +126,10 @@ static redisReply *redisReadIntegerReply(int fd) {
redisReply
*
r
=
malloc
(
sizeof
(
*
r
));
if
(
r
==
NULL
)
redisOOM
();
if
(
buf
==
NULL
)
return
redisIOError
();
if
(
buf
==
NULL
)
{
free
(
r
);
return
redisIOError
();
}
r
->
type
=
REDIS_REPLY_INTEGER
;
r
->
integer
=
strtoll
(
buf
,
NULL
,
10
);
sdsfree
(
buf
);
...
...
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