Skip to contentSkip to conversation

cluster/rgmanager/src/clulib vft.c

Cluster-devel [email protected] 1 participant 1 message Nov 14, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-11-14 16:56:50

Modified files:
rgmanager/src/clulib: vft.c

Log message:

	Fix #303981 - crash on restart

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/vft.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.17.2.3&r2=1.17.2.4

rgmanager/src/clulib/vft.c +8 -2
@@ -1368,6 +1368,7 @@
 {
 	vf_msg_t *hdrp;
 	int ret;
+	key_node_t *kn;
 
 	if ((nbytes <= 0) || (nbytes < sizeof(generic_msg_hdr)) ||
 	    (msgp->gh_command != VF_MESSAGE))
@@ -1422,8 +1423,13 @@
 #endif
 		pthread_mutex_lock(&key_list_mutex);
 		vf_buffer_commit(msgp->gh_arg2);
-		ret = (vf_resolve_views(kn_find_trans(msgp->gh_arg2)) ?
-			VFR_COMMIT : VFR_OK);
+		kn = kn_find_trans(msgp->gh_arg2);
+		if (!kn) {
+			pthread_mutex_unlock(&key_list_mutex);
+			return VFR_OK;
+		}
+
+		ret = (vf_resolve_views(kn) ? VFR_COMMIT : VFR_OK);
 		pthread_mutex_unlock(&key_list_mutex);
 		return ret;