summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--axiom/src/om/om_node.c12
-rw-r--r--axiom/src/om/om_stax_builder.c4
-rw-r--r--src/core/transport/http/util/http_transport_utils.c8
3 files changed, 18 insertions, 6 deletions
diff --git a/axiom/src/om/om_node.c b/axiom/src/om/om_node.c
index eb2a50e..50aac77 100644
--- a/axiom/src/om/om_node.c
+++ b/axiom/src/om/om_node.c
@@ -189,6 +189,12 @@ axiom_node_free_detached_subtree(
}
}
+ /* if the owner of the builder, then free the builder */
+ if(om_node->own_builder)
+ {
+ axiom_stax_builder_free_internal(om_node->builder, env);
+ }
+
AXIS2_FREE(env->allocator, om_node);
}
@@ -210,12 +216,6 @@ axiom_node_free_tree(
/* Detach this node before freeing it and its subtree. */
axiom_node_detach_without_namespaces(om_node, env);
- /* if the owner of the builder, then free the builder */
- if(om_node->own_builder)
- {
- axiom_stax_builder_free_internal(om_node->builder, env);
- }
-
/* Free this node and its subtree */
axiom_node_free_detached_subtree(om_node, env);
}
diff --git a/axiom/src/om/om_stax_builder.c b/axiom/src/om/om_stax_builder.c
index ddd6f0e..c43fd61 100644
--- a/axiom/src/om/om_stax_builder.c
+++ b/axiom/src/om/om_stax_builder.c
@@ -153,6 +153,10 @@ axiom_stax_builder_free_self(
{
axiom_node_assume_builder_ownership(om_builder->root_node, env);
}
+ else
+ {
+ axiom_stax_builder_free_internal(om_builder, env);
+ }
}
/**
diff --git a/src/core/transport/http/util/http_transport_utils.c b/src/core/transport/http/util/http_transport_utils.c
index 0da11ac..89a6962 100644
--- a/src/core/transport/http/util/http_transport_utils.c
+++ b/src/core/transport/http/util/http_transport_utils.c
@@ -2458,9 +2458,17 @@ axis2_http_transport_utils_dispatch_and_verify(
if(axis2_msg_ctx_get_doing_rest(msg_ctx, env))
{
+ axis2_handler_desc_t *desc;
rest_disp = axis2_rest_disp_create(env);
handler = axis2_disp_get_base(rest_disp, env);
axis2_handler_invoke(handler, env, msg_ctx);
+ axis2_disp_free(rest_disp, env);
+ desc = axis2_handler_get_handler_desc(handler, env);
+ axis2_handler_free(handler, env);
+ if(desc)
+ {
+ axis2_handler_desc_free(desc, env);
+ }
if(!axis2_msg_ctx_get_svc(msg_ctx, env) || !axis2_msg_ctx_get_op(msg_ctx, env))
{