From mboxrd@z Thu Jan 1 00:00:00 1970 From: jbrassow@sourceware.org Date: 18 Jan 2008 21:00:17 -0000 Subject: [Cluster-devel] cluster/cmirror/src cluster.c Message-ID: <20080118210017.24557.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Branch: RHEL5 Changes by: jbrassow at sourceware.org 2008-01-18 21:00:16 Modified files: cmirror/src : cluster.c Log message: - fix seg fault if there are pending checkpoint requests when a mirror is shutdown. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/cluster.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.9&r2=1.1.2.10 --- cluster/cmirror/src/Attic/cluster.c 2008/01/18 17:11:07 1.1.2.9 +++ cluster/cmirror/src/Attic/cluster.c 2008/01/18 21:00:15 1.1.2.10 @@ -46,6 +46,7 @@ /* Are we the first, or have we received checkpoint? */ int valid; + int free_me; struct queue *startup_queue; int checkpoints_needed; @@ -578,6 +579,11 @@ if (r != SA_AIS_OK) LOG_ERROR("cpg_dispatch failed: %d", r); + if (entry->free_me) { + free(entry); + continue; + } + for (cp = entry->checkpoint_list; cp;) { LOG_ERROR("Checkpoint data available for node %u", cp->requester); @@ -810,7 +816,7 @@ LOG_ERROR("Startup items remain in cluster log"); free(match->startup_queue); - free(match); + match->free_me = 1; goto out; }