aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/edje/edje_cc_script.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-04-20 13:10:58 +0900
committerHermet Park <hermetpark@gmail.com>2018-04-20 13:12:22 +0900
commit215b854b5452f4811e67e37164eb9aeedbef69b9 (patch)
tree372069851984b8885ca74a71d355b780e0cd67a2 /src/bin/edje/edje_cc_script.c
parentedje: Don't access a garbage pointer. (diff)
downloadefl-215b854b5452f4811e67e37164eb9aeedbef69b9.tar.gz
edje edje_cc: fix memory leak.
This token has temporary alloc'd memory. We should free it before loosing its ptr address. @fix
Diffstat (limited to '')
-rw-r--r--src/bin/edje/edje_cc_script.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/edje/edje_cc_script.c b/src/bin/edje/edje_cc_script.c
index 15da701d77..b438737b55 100644
--- a/src/bin/edje/edje_cc_script.c
+++ b/src/bin/edje/edje_cc_script.c
@@ -89,6 +89,9 @@ code_parse_internal(Code *code)
if ((tmp->type == TOKEN_TYPE_COMMA) ||
(tmp->type == TOKEN_TYPE_SEMICOLON))
{
+ if (token->str) free(token->str);
+ free(token);
+
token = tmp;
break;
}