Blob Blame History Raw
*** babeltrace-1.5.8/converter/babeltrace.c.orig	2022-09-15 12:36:49.826369817 -0700
--- babeltrace-1.5.8/converter/babeltrace.c	2022-09-15 13:48:21.642157222 -0700
*************** static int parse_options(int argc, char
*** 449,455 ****
  	do {
  		ipath = poptGetArg(pc);
  		if (ipath)
! 			g_ptr_array_add(opt_input_paths, (gpointer) ipath);
  	} while (ipath);
  	if (opt_input_paths->len == 0) {
  		ret = -EINVAL;
--- 449,455 ----
  	do {
  		ipath = poptGetArg(pc);
  		if (ipath)
! 			g_ptr_array_add(opt_input_paths, (gpointer) strdup(ipath));
  	} while (ipath);
  	if (opt_input_paths->len == 0) {
  		ret = -EINVAL;
*************** end:
*** 880,885 ****
--- 880,889 ----
  	free(opt_output_path);
  	free(opt_debug_info_dir);
  	free(opt_debug_info_target_prefix);
+ 	for (i = 0; i < opt_input_paths->len; i++) {
+ 		char *ipath = g_ptr_array_index(opt_input_paths, i);
+ 		free(ipath);
+ 	}
  	g_ptr_array_free(opt_input_paths, TRUE);
  	if (partial_error)
  		exit(EXIT_FAILURE);