summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2020-02-24 15:52:25 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2020-02-24 15:52:25 +0100
commit4f88dfd10db05568b912e2ab76f62af5ab78aa23 (patch)
tree530210b34e68166d65e73938d6d0f4729ceaea56
parentaed480c8093ab4dfa3be156dd235c7392db8fa63 (diff)
downloadefl-4f88dfd10db05568b912e2ab76f62af5ab78aa23.tar.gz
database_expr: fix memory leak when type error happens
Summary: Memory leak is fixed when type error happens. Reviewers: q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11400
-rw-r--r--src/lib/eolian/database_expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c
index 38794a2f3c..b6d79bb19c 100644
--- a/src/lib/eolian/database_expr.c
+++ b/src/lib/eolian/database_expr.c
@@ -529,7 +529,10 @@ eval_exp(const Eolian_Unit *unit, Eolian_Expression *expr,
/* assert int here, as we're clearly dealing with enum */
if (!(mask & EOLIAN_MASK_INT))
- return expr_type_error(expr, EOLIAN_MASK_INT, mask);
+ {
+ free(fulln);
+ return expr_type_error(expr, EOLIAN_MASK_INT, mask);
+ }
etpd = eolian_unit_alias_by_name_get(unit, fulln);
if (etpd && cb) cb((const Eolian_Object *)etpd, data);