浏览代码

Merge pull request #710 from athonet-open/fix_cdp_cleanup

cdp: fix occasional segfault on process exit
Daniel-Constantin Mierla 9 年之前
父节点
当前提交
380e84d939
共有 1 个文件被更改,包括 3 次插入0 次删除
  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 */