Explorar el Código

cdp: fix occasional segfault on process exit

Dragos Oancea hace 9 años
padre
commit
4396c5fbc8
Se han modificado 1 ficheros con 3 adiciones y 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;
 	handler *h;
 
+	if (!shutdownx_lock) {
+		return;
+	}
 	lock_get(shutdownx_lock);
 	if (*shutdownx) {
 		/* already other process is cleaning stuff */