mirror of
https://github.com/fluencelabs/redis
synced 2025-04-01 23:31:03 +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) {
|
void _addReplySdsToList(redisClient *c, sds s) {
|
||||||
robj *tail;
|
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) {
|
if (listLength(c->reply) == 0) {
|
||||||
listAddNodeTail(c->reply,createObject(REDIS_STRING,s));
|
listAddNodeTail(c->reply,createObject(REDIS_STRING,s));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user