Browse Source

Merge pull request #710 from athonet-open/fix_cdp_cleanup

cdp: fix occasional segfault on process exit
Daniel-Constantin Mierla 9 years ago
parent
commit
380e84d939
1 changed files with 3 additions and 0 deletions
  1. 3 0
      modules/cdp/diameter_peer.c

+ 3 - 0
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 */