summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-01 11:48:35 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-01 11:48:41 +0100
commita74000a65cf64389d89a1014b206347795b934c7 (patch)
tree64b4b6ca033deb26ac6e9d220471086848038384
parentccbcf3db0b99c622b834897538234de3bf8e2ec4 (diff)
eolian: specialize tmp free for typedef (avoid double free issue)
@fix
-rw-r--r--src/lib/eolian/eo_lexer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index e978529b63..6e4057fd43 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -692,7 +692,10 @@ _temps_free(Eo_Lexer_Temps *tmp)
692 eina_strbuf_free(buf); 692 eina_strbuf_free(buf);
693 693
694 EINA_LIST_FREE(tmp->type_defs, tp) 694 EINA_LIST_FREE(tmp->type_defs, tp)
695 database_type_del(tp); 695 if (tp->type == EOLIAN_TYPE_ALIAS)
696 database_typedef_del(tp);
697 else
698 database_type_del(tp);
696 699
697 EINA_LIST_FREE(tmp->strs, s) 700 EINA_LIST_FREE(tmp->strs, s)
698 if (s) eina_stringshare_del(s); 701 if (s) eina_stringshare_del(s);