aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2024-02-27 14:43:31 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-02-28 09:11:42 +0000
commit9e096a76c78ac215e8d06cc9739ab9c181d85a2b (patch)
treea0f62e7309a75c579186e6b85d3b490d05c9ac3e /contrib
parent6036b9cfde74f45af7ef449d7c034fb8a9cf2901 (diff)
contrib/plugins: fix imatch
We can't directly save the ephemeral imatch from argv as that memory will get recycled. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240227144335.1196131-26-alex.bennee@linaro.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/plugins/execlog.c2
1 files changed, 1 insertions, 1 deletions
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)