Free command before returning

This commit is contained in:
Pieter Noordhuis 2010-09-25 15:26:34 +02:00
parent bc3ec0f35a
commit cab99f6427

View File

@ -760,6 +760,7 @@ void *redisCommand(redisContext *c, const char *format, ...) {
if (c->flags & REDIS_BLOCK) {
if (redisCommandWriteBlock(c,&reply,cmd,sdslen(cmd)) == REDIS_OK) {
sdsfree(cmd);
return reply;
}
} else {