redisReaderGetReply leak memory
This commit is contained in:
parent
f5f855c912
commit
918e24c83b
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