Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_image.c ewl_container.c Log Message: Fix mem leak in the image widget. Extra parentheses around assignment in the loop. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ewl_image.c 25 Jul 2005 15:06:23 -0000 1.11 +++ ewl_image.c 25 Aug 2005 02:18:19 -0000 1.12 @@ -58,6 +58,8 @@ NULL); ewl_callback_append(w, EWL_CALLBACK_UNREALIZE, ewl_image_unrealize_cb, NULL); + ewl_callback_append(w, EWL_CALLBACK_DESTROY, ewl_image_destroy_cb, + NULL); ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, ewl_image_configure_cb, NULL); ewl_callback_append(w, EWL_CALLBACK_MOUSE_DOWN, ewl_image_mouse_down_cb, @@ -341,6 +343,21 @@ DLEAVE_FUNCTION(DLEVEL_STABLE); } +void ewl_image_destroy_cb(Ewl_Widget * w, void *ev_data __UNUSED__, + void *user_data __UNUSED__) +{ + Ewl_Image *i; + + DENTER_FUNCTION(DLEVEL_STABLE); + + i = EWL_IMAGE(w); + + IF_FREE(i->path); + IF_FREE(i->key); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + void ewl_image_reparent_cb(Ewl_Widget * w, void *ev_data __UNUSED__, void *user_data __UNUSED__) { =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_container.c 19 Aug 2005 17:50:49 -0000 1.10 +++ ewl_container.c 25 Aug 2005 02:18:19 -0000 1.11 @@ -362,8 +362,7 @@ while (container->redirect) container = container->redirect; ecore_list_goto_first(container->children); - while (child = ecore_list_next(container->children)) - { + while ((child = ecore_list_next(container->children))) { if (ewl_widget_internal_is(child)) continue; if (count == index) break; count ++; ------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs