[sr-dev] git:master:4396c5fb: cdp: fix occasional segfault on process exit

Dragos Oancea dragos.oancea at athonet.com
Thu Jul 14 14:48:02 CEST 2016


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

Author: Dragos Oancea <dragos.oancea at athonet.com>
Committer: Dragos Oancea <dragos.oancea at athonet.com>
Date: 2016-07-14T14:20:26+02:00

cdp: fix occasional segfault on process exit

---

Modified: modules/cdp/diameter_peer.c

---

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

---

diff --git a/modules/cdp/diameter_peer.c b/modules/cdp/diameter_peer.c
index dd571b2..cd0b85e 100644
--- a/modules/cdp/diameter_peer.c
+++ b/modules/cdp/diameter_peer.c
@@ -411,6 +411,9 @@ void diameter_peer_destroy()
 	int pid,status;
 	handler *h;
 
+	if (!shutdownx_lock) {
+		return;
+	}
 	lock_get(shutdownx_lock);
 	if (*shutdownx) {
 		/* already other process is cleaning stuff */




More information about the sr-dev mailing list