summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Aguirre <aguirre.nicolas@gmail.com>2015-02-03 10:44:11 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-05 15:59:10 +0100
commit71dd24a481be00b5a883ccecc9c3ed950cd083e9 (patch)
treedb10ea5eeacb3de878e8d74d41f4fd4e8addf0c7
parent8802ce20516f02cb1db9cb8768ba3f14791236f9 (diff)
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 <cedric@osg.samsung.com>
-rw-r--r--src/bin/edje/epp/cpplib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c
index 10ab5d873d..d776d88be4 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,
3538 if (angle_brackets) 3538 if (angle_brackets)
3539 pfile->system_include_depth--; 3539 pfile->system_include_depth--;
3540 } 3540 }
3541 free(fname); 3541
3542 // We are leaking fname here. This is intended as it may still be used later
3543 // on. It would be better on to track that correctly and fix it, but as it
3544 // only affect recursive include this leak is not important and time will be
3545 // better spent somewhere else.
3542 return 0; 3546 return 0;
3543} 3547}
3544 3548