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
2f8134a7
Commit
2f8134a7
authored
Jan 06, 2020
by
WuYunlong
Browse files
Fix potential memory leak of rioWriteBulkStreamID().
parent
0af467d1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/aof.c
View file @
2f8134a7
...
@@ -1139,7 +1139,10 @@ int rioWriteBulkStreamID(rio *r,streamID *id) {
...
@@ -1139,7 +1139,10 @@ int rioWriteBulkStreamID(rio *r,streamID *id) {
int retval;
int retval;
sds replyid = sdscatfmt(sdsempty(),"%U-%U",id->ms,id->seq);
sds replyid = sdscatfmt(sdsempty(),"%U-%U",id->ms,id->seq);
if
((
retval
=
rioWriteBulkString
(
r
,
replyid
,
sdslen
(
replyid
)))
==
0
)
return
0
;
if ((retval = rioWriteBulkString(r,replyid,sdslen(replyid))) == 0) {
sdsfree(replyid);
return 0;
}
sdsfree(replyid);
sdsfree(replyid);
return retval;
return retval;
}
}
...
...
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