You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by bi...@apache.org on 2020/08/30 22:31:40 UTC
[axis-axis2-c-core] branch master updated: Fix mem leak in axiom
test_parser
This is an automated email from the ASF dual-hosted git repository.
billblough pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git
The following commit(s) were added to refs/heads/master by this push:
new d7bca79 Fix mem leak in axiom test_parser
d7bca79 is described below
commit d7bca7987506d416927e21ea8217d43d9084002e
Author: William Blough <de...@blough.us>
AuthorDate: Sun Aug 30 18:29:51 2020 -0400
Fix mem leak in axiom test_parser
---
axiom/test/parser/test_parser.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/axiom/test/parser/test_parser.cc b/axiom/test/parser/test_parser.cc
index 9a3c918..ce86e6a 100644
--- a/axiom/test/parser/test_parser.cc
+++ b/axiom/test/parser/test_parser.cc
@@ -54,6 +54,8 @@ TEST_F(TestParser, test_axisc_1453) {
ASSERT_NE(output1, nullptr);
ASSERT_STREQ(output1, expected1);
+ axiom_node_free_tree(node_input1, m_env);
+ AXIS2_FREE(m_env->allocator, output1);
axis2_char_t input2[] = "<root><![CDATA[abc</root>def]]></root>";
axis2_char_t expected2[] = "<root>abc</root>def</root>";
@@ -64,6 +66,9 @@ TEST_F(TestParser, test_axisc_1453) {
ASSERT_NE(output2, nullptr);
ASSERT_STREQ(output2, expected2);
+ axiom_node_free_tree(node_input2, m_env);
+ AXIS2_FREE(m_env->allocator, output2);
+
axis2_char_t input3[] = "<root><![CDATA[]]></root>";
axis2_char_t expected3[] = "<root></root>";
@@ -73,4 +78,6 @@ TEST_F(TestParser, test_axisc_1453) {
ASSERT_NE(output3, nullptr);
ASSERT_STREQ(output3, expected3);
+ axiom_node_free_tree(node_input3, m_env);
+ AXIS2_FREE(m_env->allocator, output3);
}