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>
This commit is contained in:
Alex Bennée 2024-02-27 14:43:31 +00:00
parent 6036b9cfde
commit 9e096a76c7

View File

@ -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)