X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Fenum.c;fp=types%2Fenum.c;h=1c71f9e660f7436782a7c80618a2f8b876f76bae;hp=b60c9c56ce239a08dcaa23ffbbf4fb4ca70ee1af;hb=a35173fe7e72fe456cbd19db34a5ff7a09a0c7ff;hpb=c6e183c2bacc6ee12b0545ef47fb41b63686d8c8 diff --git a/types/enum.c b/types/enum.c index b60c9c56..1c71f9e6 100644 --- a/types/enum.c +++ b/types/enum.c @@ -418,14 +418,14 @@ struct definition * _enum->p.index = root_name ? INT_MAX : index; _enum->p.name = field_name; _enum->p.path = new_definition_path(parent_scope, field_name, root_name); - _enum->scope = new_definition_scope(parent_scope, field_name, root_name); + _enum->p.scope = new_definition_scope(parent_scope, field_name, root_name); _enum->value = NULL; ret = register_field_definition(field_name, &_enum->p, parent_scope); assert(!ret); definition_integer_parent = enum_declaration->integer_declaration->p.definition_new(&enum_declaration->integer_declaration->p, - _enum->scope, + _enum->p.scope, g_quark_from_static_string("container"), 0, NULL); _enum->integer = container_of(definition_integer_parent, struct definition_integer, p); @@ -439,6 +439,7 @@ void _enum_definition_free(struct definition *definition) container_of(definition, struct definition_enum, p); definition_unref(&_enum->integer->p); + free_definition_scope(_enum->p.scope); declaration_unref(_enum->p.declaration); if (_enum->value) g_array_unref(_enum->value);