crm_malloc(new_id, id_len);
crm_malloc0(new_id, id_len);
set_id(crm_data_t * xml_obj, const char *prefix, int child) {	int id_len = 0;	gboolean use_prefix = TRUE;	gboolean use_child = TRUE;	char *new_id   = NULL;	const char *id = crm_element_value(xml_obj, XML_ATTR_ID);		id_len = 1 + strlen(id);	if(child > 999) {		crm_err("Are you insane?!?"			" The CRM does not support > 1000 children per resource");		return;			} else if(child < 0) {		use_child = FALSE;			} else {		id_len += 4; /* child */	}		if(prefix == NULL || safe_str_eq(id, prefix)) {		use_prefix = FALSE;	} else {		id_len += (1 + strlen(prefix));	}		crm_malloc(new_id, id_len);	if(use_child) {		snprintf(new_id, id_len, "%s%s%s:%d",			 use_prefix?prefix:"", use_prefix?":":"", id, child);	} else {		snprintf(new_id, id_len, "%s%s%s",			 use_prefix?prefix:"", use_prefix?":":"", id);	}		set_xml_property_copy(xml_obj, XML_ATTR_ID, new_id);	crm_free(new_id);}