Set old declaration to NULL when retry
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-generate-io-struct.c
index 1947aa5e931b4602bb772d7b5183df1668b67e12..f0e5b4744667d7a1e8a52f638082ba32e4727f9a 100644 (file)
@@ -2000,8 +2000,10 @@ restart:
        return 0;
 
 error:
-       if (trace->packet_header_decl)
+       if (trace->packet_header_decl) {
                declaration_unref(&trace->packet_header_decl->p);
+               trace->packet_header_decl = NULL;
+       }
        g_ptr_array_free(trace->streams, TRUE);
        free_declaration_scope(trace->declaration_scope);
        trace->declaration_scope = NULL;
This page took 0.023988 seconds and 4 git commands to generate.