mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
fixed memory leak introduced with the previous commit. Many thanks to Pieter Noordhuis for spotting it in no time
This commit is contained in:
parent
25ef31920a
commit
5b94b8ac5d
@ -135,7 +135,10 @@ void _addReplyObjectToList(redisClient *c, robj *o) {
|
||||
void _addReplySdsToList(redisClient *c, sds s) {
|
||||
robj *tail;
|
||||
|
||||
if (c->flags & REDIS_CLOSE_AFTER_REPLY) return;
|
||||
if (c->flags & REDIS_CLOSE_AFTER_REPLY) {
|
||||
sdsfree(s);
|
||||
return;
|
||||
}
|
||||
|
||||
if (listLength(c->reply) == 0) {
|
||||
listAddNodeTail(c->reply,createObject(REDIS_STRING,s));
|
||||
|
Loading…
x
Reference in New Issue
Block a user