diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2024-02-27 14:43:31 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-02-28 09:11:42 +0000 |
commit | 9e096a76c78ac215e8d06cc9739ab9c181d85a2b (patch) | |
tree | a0f62e7309a75c579186e6b85d3b490d05c9ac3e /contrib/plugins | |
parent | 6036b9cfde74f45af7ef449d7c034fb8a9cf2901 (diff) | |
download | qemu-9e096a76c78ac215e8d06cc9739ab9c181d85a2b.zip qemu-9e096a76c78ac215e8d06cc9739ab9c181d85a2b.tar.gz qemu-9e096a76c78ac215e8d06cc9739ab9c181d85a2b.tar.bz2 |
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/plugins')
-rw-r--r-- | contrib/plugins/execlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 82dc2f5..f262e55 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) |