From 9e096a76c78ac215e8d06cc9739ab9c181d85a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 27 Feb 2024 14:43:31 +0000 Subject: contrib/plugins: fix imatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can't directly save the ephemeral imatch from argv as that memory will get recycled. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-26-alex.bennee@linaro.org> --- contrib/plugins/execlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 82dc2f584e..f262e5555e 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -199,7 +199,7 @@ static void parse_insn_match(char *match) if (!imatches) { imatches = g_ptr_array_new(); } - g_ptr_array_add(imatches, match); + g_ptr_array_add(imatches, g_strdup(match)); } static void parse_vaddr_match(char *match) -- cgit v1.2.3