[sr-dev] git:5.6:bc1e222e: ndb_redis: clean up response on moved reply with cluster mode on

Daniel-Constantin Mierla miconda at gmail.com
Wed Jul 6 09:25:47 CEST 2022


Module: kamailio
Branch: 5.6
Commit: bc1e222ea3375dc52dab135016af7d73712a05f1
URL: https://github.com/kamailio/kamailio/commit/bc1e222ea3375dc52dab135016af7d73712a05f1

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-07-06T09:24:45+02:00

ndb_redis: clean up response on moved reply with cluster mode on

(cherry picked from commit ef00062fb3feb051e3e11c62ce3c529579d23f5b)

---

Modified: src/modules/ndb_redis/redis_client.c

---

Diff:  https://github.com/kamailio/kamailio/commit/bc1e222ea3375dc52dab135016af7d73712a05f1.diff
Patch: https://github.com/kamailio/kamailio/commit/bc1e222ea3375dc52dab135016af7d73712a05f1.patch

---

diff --git a/src/modules/ndb_redis/redis_client.c b/src/modules/ndb_redis/redis_client.c
index aad0b6c1b62..c26154930b9 100644
--- a/src/modules/ndb_redis/redis_client.c
+++ b/src/modules/ndb_redis/redis_client.c
@@ -1165,6 +1165,7 @@ redisReply* redisc_exec_argv(redisc_server_t *rsrv, int argc, const char **argv,
 	if(res)
 	{
 		if (check_cluster_reply(res, &rsrv)) {
+			freeReplyObject(res);
 			goto again;
 		}
 		return res;
@@ -1175,6 +1176,7 @@ redisReply* redisc_exec_argv(redisc_server_t *rsrv, int argc, const char **argv,
 		res = redisCommandArgv(rsrv->ctxRedis, argc, argv, argvlen);
 		if (res) {
 			if (check_cluster_reply(res, &rsrv)) {
+				freeReplyObject(res);
 				goto again;
 			}
 		}




More information about the sr-dev mailing list