Merge pull request #671 from movebean/master
redisReaderGetReply leak memory
This commit is contained in:
commit
99cdec371f
5
read.c
5
read.c
@ -590,8 +590,11 @@ int redisReaderGetReply(redisReader *r, void **reply) {
|
|||||||
|
|
||||||
/* Emit a reply when there is one. */
|
/* Emit a reply when there is one. */
|
||||||
if (r->ridx == -1) {
|
if (r->ridx == -1) {
|
||||||
if (reply != NULL)
|
if (reply != NULL) {
|
||||||
*reply = r->reply;
|
*reply = r->reply;
|
||||||
|
} else if (r->reply != NULL && r->fn && r->fn->freeObject) {
|
||||||
|
r->fn->freeObject(r->reply);
|
||||||
|
}
|
||||||
r->reply = NULL;
|
r->reply = NULL;
|
||||||
}
|
}
|
||||||
return REDIS_OK;
|
return REDIS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user