Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_text.c 


Log Message:
Move node creation to avoid a potential leak.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_text.c  1 Nov 2005 23:24:21 -0000       1.39
+++ ewl_text.c  2 Nov 2005 17:40:40 -0000       1.40
@@ -3825,13 +3825,6 @@
        {
                Ewl_Text_BTree *old, *new;
 
-               /* create a node for the text */
-               new = ewl_text_btree_new();
-               new->tx = tx;
-               new->tx->ref_count ++;
-               new->length = len;
-               new->parent = tree;
-
                /* see if the contexts are the same */
                if (ewl_text_context_compare(tree->tx, tx))
                {
@@ -3839,6 +3832,13 @@
                        DRETURN(DLEVEL_STABLE);
                }
 
+               /* create a node for the text */
+               new = ewl_text_btree_new();
+               new->tx = tx;
+               new->tx->ref_count ++;
+               new->length = len;
+               new->parent = tree;
+
                /* this is the old node */
                old = ewl_text_btree_new();
                old->tx = tree->tx;




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to