Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_iconbox.c
Log Message:
Bad mem free fix
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_iconbox.c 5 Aug 2005 04:17:51 -0000 1.16
+++ ewl_iconbox.c 5 Aug 2005 11:05:40 -0000 1.17
@@ -748,14 +748,21 @@
DENTER_FUNCTION(DLEVEL_STABLE);
ewl_widget_hide(icon->image);
ewl_widget_hide(icon->floater);
- /*ewl_widget_destroy(icon->image);
- ewl_widget_destroy(icon->floater);*/
ewl_container_child_remove(EWL_CONTAINER(icon), icon->image);
ewl_container_child_remove(EWL_CONTAINER(icon), icon->w_label);
- /*ewl_container_child_remove(EWL_CONTAINER(icon->floater), icon);*/
-
//ewl_container_child_remove(EWL_CONTAINER(icon->icon_box_parent->ewl_iconbox_pane_inner),
icon->floater);
+ ewl_container_child_remove(EWL_CONTAINER(icon->floater),
EWL_WIDGET(icon));
+
ewl_container_child_remove(EWL_CONTAINER(icon->icon_box_parent->ewl_iconbox_pane_inner),
EWL_WIDGET(icon->floater));
ewl_widget_destroy(icon->image);
ewl_widget_destroy(icon->w_label);
+ ewl_widget_destroy(icon->floater);
+
+ if (icon->label) {
+ free(icon->label);
+ }
+ if (icon->label_compressed) {
+ free(icon->label_compressed);
+ }
+
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -852,12 +859,7 @@
ecore_list_goto_first(ib->ewl_iconbox_icon_list);
while((list_item =
(Ewl_IconBox_Icon*)ecore_list_next(ib->ewl_iconbox_icon_list)) != NULL) {
/*printf("Deleting icon..\n");*/
- if (list_item->label) {
- free(list_item->label);
- }
- if (list_item->label_compressed) {
- free(list_item->label_compressed);
- }
+
ewl_container_child_remove(EWL_CONTAINER(ib->ewl_iconbox_pane_inner),
EWL_WIDGET(list_item));
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs