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
This commit is contained in:
Steven Dake 2009-03-06 02:42:48 +00:00
parent 3d557674b1
commit 3619c3a965

View File

@ -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);
}