summaryrefslogtreecommitdiff
path: root/src/lib/efreet/efreet_menu.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-07-08 11:17:13 +0100
committerChris Michael <cp.michael@samsung.com>2013-07-08 11:17:13 +0100
commitc04cfde0e5ac391c9006df5410f8314f9d7cce4f (patch)
tree4c7a71465cb28d3f2e42eaa62b0aa8b2871bdbb2 /src/lib/efreet/efreet_menu.c
parent2aa12782b66c2ae23784a9c0a6d9e0242ed012ea (diff)
Fix mem leak reported by Coverity: If we fail to create a new internal
menu, then free the previously allocated xml file. NB: Fixes Coverity CID 1039182 Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/efreet/efreet_menu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_menu.c b/src/lib/efreet/efreet_menu.c
index fa04616bd8..feea57d3ea 100644
--- a/src/lib/efreet/efreet_menu.c
+++ b/src/lib/efreet/efreet_menu.c
@@ -569,7 +569,11 @@ efreet_menu_parse(const char *path)
569 569
570 /* split apart the filename and the path */ 570 /* split apart the filename and the path */
571 internal = efreet_menu_internal_new(NULL); 571 internal = efreet_menu_internal_new(NULL);
572 if (!internal) return NULL; 572 if (!internal)
573 {
574 efreet_xml_del(xml);
575 return NULL;
576 }
573 internal->efreet_merged_menus = eina_hash_string_superfast_new(NULL); 577 internal->efreet_merged_menus = eina_hash_string_superfast_new(NULL);
574 internal->efreet_merged_dirs = eina_hash_string_superfast_new(NULL); 578 internal->efreet_merged_dirs = eina_hash_string_superfast_new(NULL);
575 579