diff options
author | shankar | 2010-04-05 05:59:47 +0000 |
---|---|---|
committer | shankar | 2010-04-05 05:59:47 +0000 |
commit | 6a4307a3703b0a19abe728266deea5381145dadb (patch) | |
tree | 75b7e9cee6ec090bf111eea892b1cab77d0fa92a /samples/server/math | |
parent | afe578cd8894b9a6cd6c6b65e552448536f02dce (diff) | |
download | axis2c-6a4307a3703b0a19abe728266deea5381145dadb.tar.gz axis2c-6a4307a3703b0a19abe728266deea5381145dadb.tar.bz2 |
Fixing memory leaks
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@930802 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'samples/server/math')
-rw-r--r-- | samples/server/math/math.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/samples/server/math/math.c b/samples/server/math/math.c index c3236a2..505c5e5 100644 --- a/samples/server/math/math.c +++ b/samples/server/math/math.c @@ -132,10 +132,10 @@ axis2_math_add( result = param1 + param2; sprintf(result_str, "%ld", result); - ns1 = axiom_namespace_create(env, - "http://axis2/test/namespace1", "ns1"); + ns1 = axiom_namespace_create(env, "http://axis2/test/namespace1", "ns1"); ele1 = axiom_element_create(env, NULL, "result", ns1, &node1); text1 = axiom_text_create(env, node1, result_str, &node2); + axiom_namespace_free(ns1, env); return node1; } @@ -261,11 +261,10 @@ axis2_math_sub( result = param1 - param2; sprintf(result_str, "%ld", result); - ns1 = axiom_namespace_create(env, - "http://axis2/test/namespace1", "ns1"); + ns1 = axiom_namespace_create(env, "http://axis2/test/namespace1", "ns1"); ele1 = axiom_element_create(env, NULL, "result", ns1, &node1); text1 = axiom_text_create(env, node1, result_str, &node2); - + axiom_namespace_free(ns1, env); return node1; } @@ -390,10 +389,10 @@ axis2_math_mul( result = param1 * param2; sprintf(result_str, "%ld", result); - ns1 = axiom_namespace_create(env, - "http://axis2/test/namespace1", "ns1"); + ns1 = axiom_namespace_create(env, "http://axis2/test/namespace1", "ns1"); ele1 = axiom_element_create(env, NULL, "result", ns1, &node1); text1 = axiom_text_create(env, node1, result_str, &node2); + axiom_namespace_free(ns1, env); return node1; } @@ -521,10 +520,10 @@ axis2_math_div( result = param1 / param2; sprintf(result_str, "%ld", result); - ns1 = axiom_namespace_create(env, - "http://axis2/test/namespace1", "ns1"); + ns1 = axiom_namespace_create(env,"http://axis2/test/namespace1", "ns1"); ele1 = axiom_element_create(env, NULL, "result", ns1, &node1); text1 = axiom_text_create(env, node1, result_str, &node2); + axiom_namespace_free(ns1, env); return node1; } |