LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cman_config_reload_fix_part3.patch of Package cluster (Project home:sschapiro:openstack:upstream)

commit 6292a2220fc4c34967d56035b7dce3ce99690198
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   Mon Jul 26 18:27:46 2010 +0200

    config: free new config if we cannot find the config_version
    
    Resolves: rhbz#617161, rhbz#617163
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index f5dbcd7..fe12004 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -1191,6 +1191,7 @@ static int cmanpre_reloadconfig(struct objdb_iface_ver0 *objdb, int flush, const
 		if (config_value) {
 			config_version_new = atoi(config_value);
 		} else {
+			objdb->object_destroy(cluster_parent_handle_new);
 			sprintf (error_reason, "%s", "Cannot find new /cluster/config_version key in configuration\n");
 			goto err;
 		}