Fix segfault when typealias fails
authorSimon Marchi <simon.marchi@ericsson.com>
Mon, 18 Jul 2011 20:23:14 +0000 (16:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 18 Jul 2011 20:23:14 +0000 (16:23 -0400)
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index bdb5c68d6cfaa45ec3395fc7ad408eb23ff9792a..cda3329be4455be450b31d611ce0c8e0dee23690 100644 (file)
@@ -584,7 +584,9 @@ int ctf_typealias_visit(FILE *fd, int depth, struct declaration_scope *scope,
        return 0;
 
 error:
-       type_declaration->declaration_free(type_declaration);
+       if (type_declaration) {
+               type_declaration->declaration_free(type_declaration);
+       }
        return err;
 }
 
This page took 0.025091 seconds and 4 git commands to generate.