Fix potential memory leak of rioWriteBulkStreamID().
This commit is contained in:
parent
ecd17e819c
commit
cc90f79baf
@ -1149,7 +1149,10 @@ int rioWriteBulkStreamID(rio *r,streamID *id) {
|
||||
int retval;
|
||||
|
||||
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);
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user