Explorar o código

Merge pull request #710 from athonet-open/fix_cdp_cleanup

cdp: fix occasional segfault on process exit
Daniel-Constantin Mierla %!s(int64=9) %!d(string=hai) anos
pai
achega
380e84d939
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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;
 	int pid,status;
 	handler *h;
 	handler *h;
 
 
+	if (!shutdownx_lock) {
+		return;
+	}
 	lock_get(shutdownx_lock);
 	lock_get(shutdownx_lock);
 	if (*shutdownx) {
 	if (*shutdownx) {
 		/* already other process is cleaning stuff */
 		/* already other process is cleaning stuff */