Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_widget.c 


Log Message:
Fix memory leak.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -3 -r1.119 -r1.120
--- ewl_widget.c        5 Jan 2007 23:58:35 -0000       1.119
+++ ewl_widget.c        6 Jan 2007 00:04:34 -0000       1.120
@@ -876,6 +876,7 @@
 ewl_widget_appearance_part_text_apply(Ewl_Widget *w, const char *part, const 
char *text)
 {
        Evas_Coord nw, nh;
+       char *cleanup = NULL;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -889,12 +890,14 @@
         * Fill in the default part to use when the key is NULL.
         */
        if (!part || !*part)
-               part = ewl_theme_data_str_get(w, "textpart");
+               part = cleanup = ewl_theme_data_str_get(w, "textpart");
 
        edje_object_part_text_set(w->theme_object, part, text);
        edje_object_size_min_calc(w->theme_object, &nw, &nh);
 
        ewl_object_preferred_inner_size_set(EWL_OBJECT(w), (int)nw, (int)nh);
+
+       IF_FREE(cleanup);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to