forked from enlightenment/efl
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
This commit is contained in:
parent
fa6fac8182
commit
e54fd09c34
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue