forked from enlightenment/efl
eolian: fix minor memory leaks
This commit is contained in:
parent
edc73c4c4c
commit
2c59abc878
|
@ -105,6 +105,7 @@ _append_name(const Eolian_Object *obj, Eina_Strbuf *buf)
|
||||||
eina_strbuf_append_char(buf, '_');
|
eina_strbuf_append_char(buf, '_');
|
||||||
}
|
}
|
||||||
eina_strbuf_append(buf, eolian_object_short_name_get(obj));
|
eina_strbuf_append(buf, eolian_object_short_name_get(obj));
|
||||||
|
eina_iterator_free(itr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -534,13 +534,11 @@ database_unit_init(Eolian_State *state, Eolian_Unit *unit, const char *file)
|
||||||
unit->objects = eina_hash_stringshared_new(NULL);
|
unit->objects = eina_hash_stringshared_new(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
database_unit_del(Eolian_Unit *unit)
|
_unit_contents_del(Eolian_Unit *unit)
|
||||||
{
|
{
|
||||||
if (!unit)
|
|
||||||
return;
|
|
||||||
|
|
||||||
eina_stringshare_del(unit->file);
|
eina_stringshare_del(unit->file);
|
||||||
|
eina_hash_free(unit->children);
|
||||||
eina_hash_free(unit->classes);
|
eina_hash_free(unit->classes);
|
||||||
eina_hash_free(unit->globals);
|
eina_hash_free(unit->globals);
|
||||||
eina_hash_free(unit->constants);
|
eina_hash_free(unit->constants);
|
||||||
|
@ -550,6 +548,16 @@ database_unit_del(Eolian_Unit *unit)
|
||||||
eina_hash_free(unit->objects);
|
eina_hash_free(unit->objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
database_unit_del(Eolian_Unit *unit)
|
||||||
|
{
|
||||||
|
if (!unit)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_unit_contents_del(unit);
|
||||||
|
free(unit);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_hashlist_free(void *data)
|
_hashlist_free(void *data)
|
||||||
{
|
{
|
||||||
|
@ -588,7 +596,7 @@ eolian_state_free(Eolian_State *state)
|
||||||
if (!state)
|
if (!state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
database_unit_del(&state->unit);
|
_unit_contents_del(&state->unit);
|
||||||
|
|
||||||
eina_hash_free(state->filenames_eo);
|
eina_hash_free(state->filenames_eo);
|
||||||
eina_hash_free(state->filenames_eot);
|
eina_hash_free(state->filenames_eot);
|
||||||
|
|
Loading…
Reference in New Issue