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

[Cluster-devel] [PATCH] STABLE3: Fix crash when reloading cluster configuration



The attached patch fixes where a reload could (probably would!) crash
corosync if the command cman_tool version -r0 was issued. This was due
to accessing an uninitialised handle.

-- 

Chrissie
diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index 05f9cb4..93e940a 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -966,7 +966,7 @@ static int copy_config_tree(struct objdb_iface_ver0 *objdb, hdb_handle_t source_
 	objdb->object_name_get(source_object, object_name, &object_name_len);
 
 	objdb->object_find_create(target_parent_object, object_name, strlen(object_name), &find_handle);
-	if (always_create || objdb->object_find_next(find_handle, &object_handle))
+	if (always_create || objdb->object_find_next(find_handle, &new_object))
 			objdb->object_create(target_parent_object, &new_object, object_name, object_name_len);
 	objdb->object_find_destroy(find_handle);
 

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