cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=71dd24a481be00b5a883ccecc9c3ed950cd083e9

commit 71dd24a481be00b5a883ccecc9c3ed950cd083e9
Author: Nicolas Aguirre <aguirre.nico...@gmail.com>
Date:   Tue Feb 3 10:44:11 2015 +0100

    edje: epp - fix build of edje file in cas of recursive includes.
    
    Amitesh Singh fixed this issue with Commit
    e66e132d9dabecb8273fe3962099d4523fef1055, but this commit has been reverted
    recently, by a commit freeing ressources
    (6d0b834a76c3301bf4c4b29752f902dbe8a8525e). It's clear that we are leaking 
here
    if we remove the free, but there is also a valgrind error when this memory 
is
    freed. After trying to debug and understand the code of epp, i can only
    propose to remove this free, we will need to include a lot of files before 
this
    memory leak could be visible.
    
    It is also not a real problem, the memory leak only concern the file name 
passed
    in the include directive and epp is started per file anyway. It is unlikely 
to
    create any real life problem and we better spend our time on more pressing 
matter.
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/bin/edje/epp/cpplib.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c
index 10ab5d8..d776d88 100644
--- a/src/bin/edje/epp/cpplib.c
+++ b/src/bin/edje/epp/cpplib.c
@@ -3538,7 +3538,11 @@ do_include(cpp_reader * pfile, struct directive *keyword,
        if (angle_brackets)
           pfile->system_include_depth--;
      }
-   free(fname);
+
+   // We are leaking fname here. This is intended as it may still be used later
+   // on. It would be better on to track that correctly and fix it, but as it
+   // only affect recursive include this leak is not important and time will be
+   // better spent somewhere else.
    return 0;
 }
 

-- 


Reply via email to