Browse Source

cdp: fix occasional segfault on process exit

Dragos Oancea 9 năm trước cách đây
mục cha
commit
4396c5fbc8
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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 */