tasn pushed a commit to branch master.

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

commit e54fd09c34ab3580736cf1205c5c1edb621a65b8
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Oct 9 12:29:41 2015 +0100

    Edje cc handlers: Fix memory leak and possible crash.
    
    Due to a misplaced semicolon, EINA_LIST_FREE was doing nothing and only
    the last part was freed if there was one, and probably a crash if there
    wasn't.
    
    This shows again that having statements without {} is dangerous. We need
    to force {} and add a lint rule, or at the very least, add a rule to put
    the ; in a new line (like clang warns about by default anyway).
    
    @fix
---
 src/bin/edje/edje_cc_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index e75f0cd..c214f5b 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -5081,7 +5081,7 @@ _program_free(Edje_Program *pr)
    free((void*)pr->state2);
    free((void*)pr->sample_name);
    free((void*)pr->tone_name);
-   EINA_LIST_FREE(pr->targets, prt);
+   EINA_LIST_FREE(pr->targets, prt)
       free(prt);
    EINA_LIST_FREE(pr->after, pa)
       free(pa);

-- 


Reply via email to