Module: sip-router Branch: master Commit: 2e835b6bed7196e9a020b0c31daff88000d35913 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2e835b6b...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Jul 11 13:18:40 2011 +0200
ndb_redis: clean up previous redis reply
---
modules/ndb_redis/redis_client.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c index 7477008..37c67f7 100644 --- a/modules/ndb_redis/redis_client.c +++ b/modules/ndb_redis/redis_client.c @@ -207,6 +207,12 @@ int redisc_exec(str *srv, str *cmd, str *argv1, str *argv2, str *argv3, LM_ERR("no redis reply id found: %.*s\n", res->len, res->s); return -1; } + if(rpl->rplRedis!=NULL) + { + /* clean up previous redis reply */ + freeReplyObject(rpl->rplRedis); + rpl->rplRedis = NULL; + } c = cmd->s[cmd->len]; cmd->s[cmd->len] = '\0'; rpl->rplRedis = redisCommand(rsrv->ctxRedis, cmd->s);