[sr-dev] git:master:fffd892b: systemdops: proper check for null value

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 22 09:42:51 CET 2019


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-11-22T09:42:31+01:00

systemdops: proper check for null value

---

Modified: src/modules/systemdops/systemdops_mod.c

---

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

---

diff --git a/src/modules/systemdops/systemdops_mod.c b/src/modules/systemdops/systemdops_mod.c
index 0ac15426d1..8c24ac1869 100644
--- a/src/modules/systemdops/systemdops_mod.c
+++ b/src/modules/systemdops/systemdops_mod.c
@@ -69,7 +69,7 @@ void ksr_sd_app_shutdown(void)
 int mod_register(char *path, int *dlflags, void *p1, void *p2)
 {
 	sr_corecb_t *cbp = sr_corecb_get();
-	if(cbp) {
+	if(cbp==NULL) {
 		return -1;
 	}
 	cbp->app_ready = ksr_sd_app_ready;




More information about the sr-dev mailing list