From 4e52027fe7443c7207bd470fe0ad0cf1a9885db8 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 23 Aug 2024 17:53:02 +0200 Subject: [PATCH] Fix invalid free() in run-test262 (#487) --- run-test262.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-test262.c b/run-test262.c index 9c6475a..b9928a9 100644 --- a/run-test262.c +++ b/run-test262.c @@ -2077,7 +2077,7 @@ int main(int argc, char **argv) } else if (str_equal(arg, "-f")) { is_dir_list = FALSE; } else if (str_equal(arg, "-r")) { - report_filename = get_opt_arg(arg, argv[optind++]); + report_filename = strdup(get_opt_arg(arg, argv[optind++])); } else if (str_equal(arg, "-E")) { only_check_errors = TRUE; } else if (str_equal(arg, "-T")) {