mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Free the sds in addReplySds when it cannot be added to the reply
This commit is contained in:
parent
2403fc9fde
commit
cd76bb651d
@ -128,7 +128,11 @@ void addReply(redisClient *c, robj *obj) {
|
||||
}
|
||||
|
||||
void addReplySds(redisClient *c, sds s) {
|
||||
if (_ensureFileEvent(c) != REDIS_OK) return;
|
||||
if (_ensureFileEvent(c) != REDIS_OK) {
|
||||
/* The caller expects the sds to be free'd. */
|
||||
sdsfree(s);
|
||||
return;
|
||||
}
|
||||
if (sdslen(s) < REDIS_REPLY_CHUNK_THRESHOLD) {
|
||||
_addReplyStringToBuffer(c,s,sdslen(s));
|
||||
sdsfree(s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user