summaryrefslogtreecommitdiff
path: root/legacy/eina
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-08-20 06:18:21 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-08-20 06:18:21 +0000
commit386f4736f50d212c2d7e373bebfb86ad8a5c76a9 (patch)
tree28cffb62d80db0c3f7455d414476b1bd2ae6413e /legacy/eina
parent3e07b05cd9417ac625e55245dcfef0e8fd6b167b (diff)
Eina: fix possible mem leak
SVN revision: 75441
Diffstat (limited to 'legacy/eina')
-rw-r--r--legacy/eina/src/lib/eina_simple_xml_parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/legacy/eina/src/lib/eina_simple_xml_parser.c b/legacy/eina/src/lib/eina_simple_xml_parser.c
index 0b83594d5f..29c5ea1d6d 100644
--- a/legacy/eina/src/lib/eina_simple_xml_parser.c
+++ b/legacy/eina/src/lib/eina_simple_xml_parser.c
@@ -687,10 +687,12 @@ eina_simple_xml_node_tag_free(Eina_Simple_XML_Node_Tag *tag)
687static Eina_Simple_XML_Node_Data * 687static Eina_Simple_XML_Node_Data *
688_eina_simple_xml_node_data_new(Eina_Simple_XML_Node_Tag *parent, Eina_Simple_XML_Node_Type type, const char *content, unsigned length) 688_eina_simple_xml_node_data_new(Eina_Simple_XML_Node_Tag *parent, Eina_Simple_XML_Node_Type type, const char *content, unsigned length)
689{ 689{
690 Eina_Simple_XML_Node_Data *n = malloc(sizeof(*n) + length + 1); 690 Eina_Simple_XML_Node_Data *n;
691 691
692 if (!content) return NULL; 692 if (!content) return NULL;
693 693
694 n = malloc(sizeof(*n) + length + 1);
695
694 if (!n) 696 if (!n)
695 { 697 {
696 ERR("could not allocate memory for node"); 698 ERR("could not allocate memory for node");