[sr-dev] git:master:380e84d9: Merge pull request #710 from athonet-open/fix_cdp_cleanup

GitHub noreply at github.com
Thu Jul 14 14:48:02 CEST 2016


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2016-07-14T14:47:57+02:00

Merge pull request #710 from athonet-open/fix_cdp_cleanup

cdp: fix occasional segfault on process exit

---

Modified: modules/cdp/diameter_peer.c

---

Diff:  https://github.com/kamailio/kamailio/commit/380e84d93986496f0c3ac78b11df9c889a099c94.diff
Patch: https://github.com/kamailio/kamailio/commit/380e84d93986496f0c3ac78b11df9c889a099c94.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