Module: kamailio
Branch: master
Commit: 27b2ddf926240b1dd269eb1d96767d73edf9c6e6
URL:
https://github.com/kamailio/kamailio/commit/27b2ddf926240b1dd269eb1d96767d7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-08-11T16:33:02+02:00
core: proper test when initializing _ksr_shutdown_phase shm pointer
---
Modified: src/core/sr_module.c
---
Diff:
https://github.com/kamailio/kamailio/commit/27b2ddf926240b1dd269eb1d96767d7…
Patch:
https://github.com/kamailio/kamailio/commit/27b2ddf926240b1dd269eb1d96767d7…
---
diff --git a/src/core/sr_module.c b/src/core/sr_module.c
index 545845fdc5..56ba8bca59 100644
--- a/src/core/sr_module.c
+++ b/src/core/sr_module.c
@@ -110,11 +110,11 @@ unsigned int set_modinit_delay(unsigned int v)
}
/* shut down phase for instance - kept in shared memory */
-static int *_ksr_shutdown_phase = 0;
+static int *_ksr_shutdown_phase = NULL;
int ksr_shutdown_phase_init(void)
{
- if(_ksr_shutdown_phase) {
+ if(_ksr_shutdown_phase == NULL) {
_ksr_shutdown_phase = (int*)shm_malloc(sizeof(int));
}
return 0;