[sr-dev] git:master:cf8d6066: janssonrpc-c: fix shared memory leak on notification requests

Emmanuel Schmidbauer emmanuel at getweave.com
Wed Nov 2 15:49:58 CET 2016


Module: kamailio
Branch: master
Commit: cf8d6066afc102d5904dddec0275079885f0ead1
URL: https://github.com/kamailio/kamailio/commit/cf8d6066afc102d5904dddec0275079885f0ead1

Author: Emmanuel Schmidbauer <emmanuel at getweave.com>
Committer: Emmanuel Schmidbauer <emmanuel at getweave.com>
Date: 2016-11-02T10:15:49-04:00

janssonrpc-c: fix shared memory leak on notification requests

---

Modified: modules/janssonrpc-c/janssonrpc_io.c

---

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

---

diff --git a/modules/janssonrpc-c/janssonrpc_io.c b/modules/janssonrpc-c/janssonrpc_io.c
index 036032e..a25e40d 100644
--- a/modules/janssonrpc-c/janssonrpc_io.c
+++ b/modules/janssonrpc-c/janssonrpc_io.c
@@ -534,6 +534,8 @@ void cmd_pipe_cb(int fd, short event, void *arg)
 		WARN("%s could not be sent to connection group: %.*s\n",
 				type, STR(req_cmd->conn));
 		fail_request(JRPC_ERR_SEND, req, "Failed to send request");
+	} else if (req_cmd->notify_only == true) { // free notification requests if they are sent
+		free_req_cmd(req_cmd);
 	}
 
 end:




More information about the sr-dev mailing list