crm_data_t *parent = NULL;
int has_parent = 0;
free_xml_fn(crm_data_t *a_node){        if(a_node == NULL) {		; /*  nothing to do */#ifdef USE_LIBXML		} else if (a_node->doc != NULL) {		xmlFreeDoc(a_node->doc);	} else {		/* make sure the node is unlinked first */		xmlUnlinkNode(a_node);		xmlFreeNode(a_node);#else	} else {		crm_data_t *parent = NULL;		crm_validate_data(a_node);		parent = crm_element_parent(a_node);		if(parent != NULL) {			/* delete it from the parent */			crm_validate_data(parent);			cl_msg_remove_value(parent, a_node);			crm_validate_data(parent);		} else {			crm_validate_data(a_node);			crm_msg_del(a_node);		}#endif	}		return;}