Skip to contentSkip to conversation

cluster/cman/daemon commands.c

Cluster-devel [email protected] 1 participant 1 message Sep 12, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2006-09-12 12:45:52

Modified files:
cman/daemon : commands.c

Log message:
Fix strdup braindamage that probably caused segfaults when nodes left the cluster.

This is likely to be the cause of bz#206083 (thanks to Steven Dake for most of the diagnostics on this).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/commands.c.diff?cvsroot=cluster&r1=1.48&r2=1.49

cman/daemon/commands.c +1 -1
@@ -1644,7 +1644,7 @@
 	if (node->fence_agent && msg->fence_agent[0] && strcmp(node->fence_agent, msg->fence_agent))
 	{
 		free(node->fence_agent);
-		strdup(node->fence_agent);
+		node->fence_agent = strdup(msg->fence_agent);
 		node->fence_time = msg->fence_time;
 	}