Module: kamailio
Branch: master
Commit: 11494de3d9d61df3fc31669c75cbd5ff11b03d0f
URL:
https://github.com/kamailio/kamailio/commit/11494de3d9d61df3fc31669c75cbd5f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-02-05T09:49:56+01:00
keepalive: init 0 allocated keepalive structures
- GH #2618
---
Modified: src/modules/keepalive/keepalive_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/11494de3d9d61df3fc31669c75cbd5f…
Patch:
https://github.com/kamailio/kamailio/commit/11494de3d9d61df3fc31669c75cbd5f…
---
diff --git a/src/modules/keepalive/keepalive_mod.c
b/src/modules/keepalive/keepalive_mod.c
index 6339c3f2ac..37872b89b1 100644
--- a/src/modules/keepalive/keepalive_mod.c
+++ b/src/modules/keepalive/keepalive_mod.c
@@ -253,7 +253,7 @@ static int ka_mod_add_destination(modparam_t type, void *val) {
char *uri = (char *)val;
ka_initial_dest_t *current_position = NULL;
- ka_initial_dest_t *new_destination = (ka_initial_dest_t *)
shm_malloc(sizeof(ka_initial_dest_t));
+ ka_initial_dest_t *new_destination = (ka_initial_dest_t *)
shm_mallocxz(sizeof(ka_initial_dest_t));
new_destination->uri.s = shm_malloc(sizeof(char) * strlen(uri));
new_destination->owner.s = shm_malloc(sizeof(char) * strlen(owner));
@@ -308,7 +308,7 @@ int ka_alloc_destinations_list()
return 1;
}
- ka_destinations_list = (ka_destinations_list_t *)shm_malloc(
+ ka_destinations_list = (ka_destinations_list_t *)shm_mallocxz(
sizeof(ka_destinations_list_t));
if(ka_destinations_list == NULL) {
LM_ERR("no more memory.\n");