Eina Example: Fix memory leak of variable buf

Summary: Fix memory leak of buf in eina_test_simple_xml_parser.c as reported by static analysis tool, Cppcheck.

Reviewers: singh.amitesh, Hermet, jpeg

Reviewed By: jpeg

Subscribers: alok25, mvsovani, sachin.dev, cedric

Differential Revision: https://phab.enlightenment.org/D3371
This commit is contained in:
Yeshwanth Reddivari 2015-11-23 21:04:15 +09:00 committed by Jean-Philippe Andre
parent 3700be959b
commit b3a917563c
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ START_TEST(eina_simple_xml_parser_node_dump)
ck_assert_str_eq(out, buf);
free(out);
eina_simple_xml_node_root_free(root);
free(buf);
}
free(buf);
}
}
fclose(f);
@ -251,9 +251,9 @@ START_TEST(eina_simple_xml_parser_parse_with_custom_callback)
EINA_TRUE,
eina_simple_xml_parser_parse_with_custom_callback_tag_cb,
&parse_current_state);
free(buf);
fail_if(parse_current_state != simple_xml_parser_current_state_end);
}
free(buf);
}
}