Fix sequence field name use after free
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 16 Sep 2011 17:40:34 +0000 (13:40 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 16 Sep 2011 17:40:34 +0000 (13:40 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
types/sequence.c

index ed719bc5d553ef3b34d5125c38dcd771076ec1a9..ae91ef87798683b6958892d32fc331c3da09c0cb 100644 (file)
@@ -59,8 +59,8 @@ int sequence_rw(struct stream_pos *pos, struct definition *definition)
 
                str = g_string_new("");
                g_string_printf(str, "[%" PRIu64 "]", i);
-               (void) g_string_free(str, TRUE);
                name = g_quark_from_string(str->str);
+               (void) g_string_free(str, TRUE);
 
                field = (struct definition **) &g_ptr_array_index(sequence_definition->elems, i);
                *field = sequence_declaration->elem->definition_new(sequence_declaration->elem,
This page took 0.024322 seconds and 4 git commands to generate.