From 6a4307a3703b0a19abe728266deea5381145dadb Mon Sep 17 00:00:00 2001 From: shankar Date: Mon, 5 Apr 2010 05:59:47 +0000 Subject: Fixing memory leaks git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@930802 13f79535-47bb-0310-9956-ffa450edef68 --- samples/user_guide/clients/echo_util.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'samples/user_guide/clients') diff --git a/samples/user_guide/clients/echo_util.c b/samples/user_guide/clients/echo_util.c index a38158b..c3ede56 100644 --- a/samples/user_guide/clients/echo_util.c +++ b/samples/user_guide/clients/echo_util.c @@ -30,19 +30,18 @@ build_om_payload_for_echo_svc( axiom_namespace_t *ns1 = NULL; axis2_char_t *om_str = NULL; - ns1 = - axiom_namespace_create(env, "http://ws.apache.org/axis2/services/echo", - "ns1"); - echo_om_ele = - axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node); - text_om_ele = - axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node); + ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/services/echo", "ns1"); + echo_om_ele = axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node); + text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node); axiom_element_set_text(text_om_ele, env, "Hello World!", text_om_node); + axiom_namespace_free(ns1, env); om_str = axiom_node_to_string(echo_om_node, env); if (om_str) + { printf("\nSending OM : %s\n", om_str); - AXIS2_FREE(env->allocator, om_str); + AXIS2_FREE(env->allocator, om_str); + } return echo_om_node; } -- cgit v1.1-32-gdbae