Fix: Undefined behavior of double free on strlist in get_names_args
[babeltrace.git] / converter / babeltrace.c
index ef5016ed3a1907f91176ff9ba3ce59e352d7c6e4..ed19fa85a5b0fd59baa958be6f5eb3a8ef45d096 100644 (file)
@@ -68,7 +68,7 @@ static char *opt_input_format, *opt_output_format;
 static GPtrArray *opt_input_paths;
 static char *opt_output_path;
 
-static struct format *fmt_read;
+static struct bt_format *fmt_read;
 
 static
 void strlower(char *str)
@@ -204,7 +204,6 @@ static int get_names_args(poptContext *pc)
                        opt_payload_field_names = 0;
                } else {
                        fprintf(stderr, "[error] unknown field name type %s\n", str);
-                       free(strlist);
                        ret = -EINVAL;
                        goto end;
                }
@@ -555,7 +554,7 @@ error_iter:
 int main(int argc, char **argv)
 {
        int ret, partial_error = 0, open_success = 0;
-       struct format *fmt_write;
+       struct bt_format *fmt_write;
        struct bt_trace_descriptor *td_write;
        struct bt_context *ctx;
        int i;
This page took 0.023441 seconds and 4 git commands to generate.