Build fixes.
[babeltrace.git] / types / types.c
index b766f8d8d4cb415e23011c82eaf217ded71b110a..8272b8147db08fdc822a153d44050beabd9fb19c 100644 (file)
@@ -49,11 +49,14 @@ static void free_type(struct type *type)
 
 static void free_declaration(struct declaration *declaration)
 {
-       declaration->p.declaration_free(declaration);
+       declaration->type->declaration_free(declaration);
 }
 
 int register_type(struct type *type, struct declaration_scope *scope)
 {
+       if (!type->name)
+               return -EPERM;
+
        /* Only lookup in local scope */
        if (lookup_type_scope(type->name, scope))
                return -EEXIST;
This page took 0.023735 seconds and 4 git commands to generate.