Fix: memleak on error path
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 2 Apr 2013 19:25:55 +0000 (15:25 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 2 Apr 2013 19:25:55 +0000 (15:25 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index 10b59f10558202c99e72fd6e9184586ab4b76a10..fe0b6b4d9ed8db460cc9d5152d5e9a16805130a8 100644 (file)
@@ -1158,8 +1158,10 @@ struct bt_declaration *ctf_declaration_type_specifier_visit(FILE *fd, int depth,
 
        str = g_string_new("");
        ret = visit_type_specifier_list(fd, type_specifier_list, str);
-       if (ret)
+       if (ret) {
+               (void) g_string_free(str, TRUE);
                return NULL;
+       }
        str_c = g_string_free(str, FALSE);
        id_q = g_quark_from_string(str_c);
        g_free(str_c);
This page took 0.024948 seconds and 4 git commands to generate.