[sr-dev] git:5.2:f247933a: jsonrpcs: fix double free crash

Federico Cabiddu federico.cabiddu at gmail.com
Thu Feb 7 09:39:17 CET 2019


Module: kamailio
Branch: 5.2
Commit: f247933aac6ada6147ce83943cca87b24805e96f
URL: https://github.com/kamailio/kamailio/commit/f247933aac6ada6147ce83943cca87b24805e96f

Author: Federico Cabiddu <federico.cabiddu at gmail.com>
Committer: Federico Cabiddu <federico.cabiddu at gmail.com>
Date: 2019-02-07T09:39:04+01:00

jsonrpcs: fix double free crash

(cherry picked from commit 9dc5cbaa4f078adee0a061885965494a9364e5d0)

---

Modified: src/modules/jsonrpcs/jsonrpcs_mod.c

---

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

---

diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c b/src/modules/jsonrpcs/jsonrpcs_mod.c
index 8049779e55..a6c5616561 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -1297,7 +1297,6 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
 	if (!ctx->reply_sent && !(ctx->flags&JSONRPC_DELAYED_REPLY_F)) {
 		ret = jsonrpc_send(ctx);
 	}
-	srjson_DeleteDoc(ctx->jreq);
 	jsonrpc_clean_context(ctx);
 	if (ret < 0) return -1;
 	return 1;




More information about the sr-dev mailing list