Selaa lähdekoodia

cdp: fix occasional segfault on process exit

Dragos Oancea 9 vuotta sitten
vanhempi
commit
4396c5fbc8
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  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 */