[sr-dev] git:master:dba589a5: janssonrpcc: use size of data type to allocate memory

Daniel-Constantin Mierla miconda at gmail.com
Sat Dec 30 17:51:13 CET 2017


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-12-29T11:17:25+01:00

janssonrpcc: use size of data type to allocate memory

---

Modified: src/modules/janssonrpcc/janssonrpcc_mod.c

---

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

---

diff --git a/src/modules/janssonrpcc/janssonrpcc_mod.c b/src/modules/janssonrpcc/janssonrpcc_mod.c
index 654ea8280c..081cf3ca8e 100644
--- a/src/modules/janssonrpcc/janssonrpcc_mod.c
+++ b/src/modules/janssonrpcc/janssonrpcc_mod.c
@@ -225,7 +225,7 @@ void mod_destroy(void)
 int parse_server_param(modparam_t type, void* val)
 {
 	if(global_server_group == NULL) {
-		global_server_group = shm_malloc(sizeof(void*));
+		global_server_group = (jsonrpc_server_group_t**)shm_malloc(sizeof(jsonrpc_server_group_t*));
 		*global_server_group = NULL;
 	}
 	return jsonrpc_parse_server((char*)val, global_server_group);




More information about the sr-dev mailing list