public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - libfence: fix premature free of victim name
@ 2009-02-25  8:41 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-02-25  8:41 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c4c056a6c9ef5f8346fd9c1b871291f253791aa7
Commit:        c4c056a6c9ef5f8346fd9c1b871291f253791aa7
Parent:        9c04acf190e14e22e1501cfa257f2be97b0b863f
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Wed Feb 25 09:39:36 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Wed Feb 25 09:39:36 2009 +0100

libfence: fix premature free of victim name

also fixes fencing for multiple methods

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 fence/libfence/agent.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fence/libfence/agent.c b/fence/libfence/agent.c
index 883202f..51e9371 100644
--- a/fence/libfence/agent.c
+++ b/fence/libfence/agent.c
@@ -377,8 +377,7 @@ int fence_node(char *victim, struct fence_log *log, int log_size,
 
 		if (device)
 			free(device);
-		if (victim_nodename)
-			free(victim_nodename);
+
 		free(method);
 
 		/* we return 0 for fencing success when use_device has
@@ -387,6 +386,9 @@ int fence_node(char *victim, struct fence_log *log, int log_size,
 		if (!error)
 			break;
 	}
+
+	if (victim_nodename)
+		free(victim_nodename);
  out:
 	ccs_disconnect(cd);
  ret:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-25  8:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-25  8:41 cluster: STABLE3 - libfence: fix premature free of victim name Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).