Module: kamailio
Branch: master
Commit: dba589a52bddc2833c41c91287a328d22fbc2712
URL:
https://github.com/kamailio/kamailio/commit/dba589a52bddc2833c41c91287a328d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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/dba589a52bddc2833c41c91287a328d…
Patch:
https://github.com/kamailio/kamailio/commit/dba589a52bddc2833c41c91287a328d…
---
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);