Author: amantaut
Date: Mon Nov 18 18:46:43 2013
New Revision: 1543104
URL: http://svn.apache.org/r1543104
Log:
Modified axiom_node_detach_without_namespaces() to keep a reference to the
builder if the node is the owner.
Fixes AXIS2C-1650.
Modified:
axis/axis2/c/core/trunk/axiom/src/om/om_node.c
Modified: axis/axis2/c/core/trunk/axiom/src/om/om_node.c
URL:
http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/om_node.c?rev=1543104&r1=1543103&r2=1543104&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/om_node.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/om_node.c Mon Nov 18 18:46:43 2013
@@ -313,10 +313,14 @@ axiom_node_detach_without_namespaces(
axiom_stax_builder_set_lastnode(om_node->builder, env, lastnode);
}
+ /* If the node is the owner of the builder, keep a reference to the builder
+ * the builder will be freed when this node is destroyed*/
+ if(!om_node->own_builder)
+ om_node->builder = NULL;
+
om_node->parent = NULL;
om_node->prev_sibling = NULL;
om_node->next_sibling = NULL;
- om_node->builder = NULL;
return om_node;
}