Free command before returning
This commit is contained in:
parent
bc3ec0f35a
commit
cab99f6427
@ -760,6 +760,7 @@ void *redisCommand(redisContext *c, const char *format, ...) {
|
|||||||
|
|
||||||
if (c->flags & REDIS_BLOCK) {
|
if (c->flags & REDIS_BLOCK) {
|
||||||
if (redisCommandWriteBlock(c,&reply,cmd,sdslen(cmd)) == REDIS_OK) {
|
if (redisCommandWriteBlock(c,&reply,cmd,sdslen(cmd)) == REDIS_OK) {
|
||||||
|
sdsfree(cmd);
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user