Module: kamailio
Branch: master
Commit: f27c2e06d7467c4c33ff289175862ae7614a3018
URL:
https://github.com/kamailio/kamailio/commit/f27c2e06d7467c4c33ff289175862ae…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-02-10T17:01:36+01:00
core: initialize allocated _ksr_shutdown_phase pointer
---
Modified: src/core/sr_module.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f27c2e06d7467c4c33ff289175862ae…
Patch:
https://github.com/kamailio/kamailio/commit/f27c2e06d7467c4c33ff289175862ae…
---
diff --git a/src/core/sr_module.c b/src/core/sr_module.c
index 3af6b310dd..a021cb92c3 100644
--- a/src/core/sr_module.c
+++ b/src/core/sr_module.c
@@ -118,7 +118,7 @@ static int *_ksr_shutdown_phase = NULL;
int ksr_shutdown_phase_init(void)
{
if((_ksr_shutdown_phase == NULL) && (shm_initialized())) {
- _ksr_shutdown_phase = (int*)shm_malloc(sizeof(int));
+ _ksr_shutdown_phase = (int*)shm_mallocxz(sizeof(int));
}
return 0;
}
@@ -786,6 +786,8 @@ void destroy_modules()
*_ksr_shutdown_phase = 1;
}
+ LM_DBG("starting modules destroy phase\n");
+
/* call first destroy function from each module */
t=modules;
while(t) {