diff --git a/legacy/ecore/src/lib/ecore_desktop/Ecore_Desktop.h b/legacy/ecore/src/lib/ecore_desktop/Ecore_Desktop.h
index 2ba3bade7b..5feb295269 100644
--- a/legacy/ecore/src/lib/ecore_desktop/Ecore_Desktop.h
+++ b/legacy/ecore/src/lib/ecore_desktop/Ecore_Desktop.h
@@ -131,10 +131,8 @@ struct _Ecore_Desktop_Tree
{
Ecore_Desktop_Tree_Element *elements; /* An array of elements. */
int size; /* The size of the array. */
-#if 0
char **buffers; /* An array of pointers to the bits of data. */
int buffers_size; /* The size of the array. */
-#endif
Ecore_Desktop_Tree *parent; /* Parent if this is a child. */
};
@@ -247,8 +245,7 @@ extern "C"
Ecore_Desktop_Tree *
element);
Ecore_Desktop_Tree *ecore_desktop_tree_add_hash(Ecore_Desktop_Tree * tree,
- Ecore_Hash * element,
- int free);
+ Ecore_Hash * element);
void ecore_desktop_tree_remove(Ecore_Desktop_Tree * tree,
int element);
int ecore_desktop_tree_exist(Ecore_Desktop_Tree * tree,
diff --git a/legacy/ecore/src/lib/ecore_desktop/ecore_desktop_menu.c b/legacy/ecore/src/lib/ecore_desktop/ecore_desktop_menu.c
index 85184440a9..a9ea1ae292 100644
--- a/legacy/ecore/src/lib/ecore_desktop/ecore_desktop_menu.c
+++ b/legacy/ecore/src/lib/ecore_desktop/ecore_desktop_menu.c
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
/*
* This conforms with the freedesktop.org Desktop Menu Specification version 0.92
*
@@ -150,7 +147,8 @@ ecore_desktop_menu_for_each(void (*func)
/* create the .desktop and order files from the menu */
ecore_desktop_tree_foreach(menus, 0, _ecore_desktop_menu_make_apps,
func);
- ecore_desktop_tree_del(menus);
+// FIXME: Can't free this just yet, causes major memory corruption.
+// ecore_desktop_tree_del(menus);
}
free(menu_file);
}
@@ -269,8 +267,6 @@ _ecore_desktop_menu_get0(char *file, Ecore_Desktop_Tree * merge_stack,
if (oops == 0)
{
-#if 1
- /* FIXME: Somewhere in this code mem leaks. */
/* Get on with it. */
ecore_desktop_tree_foreach(menu_xml, 0, _ecore_desktop_menu_unxml,
&data);
@@ -304,7 +300,6 @@ _ecore_desktop_menu_get0(char *file, Ecore_Desktop_Tree * merge_stack,
printf("\n\n");
#endif
}
-#endif
}
}
else
@@ -313,14 +308,14 @@ _ecore_desktop_menu_get0(char *file, Ecore_Desktop_Tree * merge_stack,
if (oops)
{
E_FN_DEL(ecore_desktop_tree_del, (menu_xml));
+ if (level == 0)
+ {
+ E_FN_DEL(ecore_desktop_tree_del, (merge_stack));
+ }
+ E_FREE(data.path);
+ E_FREE(data.base);
+ E_FN_DEL(ecore_desktop_tree_del, (data.stack));
}
- if (level == 0)
- {
- E_FN_DEL(ecore_desktop_tree_del, (merge_stack));
- }
- E_FN_DEL(ecore_desktop_tree_del, (data.stack));
- E_FREE(data.path);
- E_FREE(data.base);
return menu_xml;
}
@@ -339,7 +334,6 @@ _ecore_desktop_menu_unxml(const void *data, Ecore_Desktop_Tree * tree,
tree->elements[element].type =
ECORE_DESKTOP_TREE_ELEMENT_TYPE_NULL;
tree->elements[element].element = NULL;
- tree->elements[element].free = 0;
}
else if (strcmp((char *)tree->elements[element].element, "