Просмотр исходного кода

Use list_del on process info in the condition that lib_exit_fn is called
to prevent segfault from processes later processing that list entry.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1791 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 17 лет назад
Родитель
Сommit
3619c3a965
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/cpg.c

+ 1 - 1
services/cpg.c

@@ -489,8 +489,8 @@ static int cpg_lib_exit_fn (void *conn)
 		notify_info.nodeid = api->totem_nodeid_get();
 		notify_info.reason = CONFCHG_CPG_REASON_PROCDOWN;
 		cpg_node_joinleave_send(gi, pi, MESSAGE_REQ_EXEC_CPG_PROCLEAVE, CONFCHG_CPG_REASON_PROCDOWN);
-		list_del(&pi->list);
 	}
+	list_del(&pi->list);
 	api->ipc_refcnt_dec (conn);
 	return (0);
 }