[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/group/daemon app.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-09-14 20:56:55

Modified files:
	group/daemon   : app.c 

Log message:
	Fixes a really stupid bug checked in yesterday that causes groupd
	to seg fault due to referencing a pointer that's not been set yet.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/app.c.diff?cvsroot=cluster&r1=1.43&r2=1.44

--- cluster/group/daemon/app.c	2006/09/12 21:57:05	1.43
+++ cluster/group/daemon/app.c	2006/09/14 20:56:55	1.44
@@ -723,10 +723,17 @@
 int do_startdone(char *name, int level, int event_nr)
 {
 	group_t *g;
-	event_t *ev = g->app->current_event;
+	event_t *ev;
 	char *state;
 
 	g = find_group_level(name, level);
+	if (!g) {
+		log_print("do_startdone: no group level %d name %s",
+			  level, name);
+		return -1;
+	}
+
+	ev = g->app->current_event;
 
 	state = ev ? ev_state_str(ev) : "no-event";
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]