From bb7a03fa21fda54618adf9847d19d25a8e48e874 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 22 Aug 2024 21:16:06 +0200 Subject: [PATCH] Fix invalid free() in run-test262 --- run-test262.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-test262.c b/run-test262.c index 9c6475ae3..b9928a980 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")) {