[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-ppc
Subject: [PATCH 38/40] contrib/plugins: fix imatch
From: Alex Bennée <alex.bennee () linaro ! org>
Date: 2023-12-21 10:38:16
Message-ID: 20231221103818.1633766-39-alex.bennee () linaro ! org
[Download RAW message or body]
We can't directly save the ephemeral imatch from argv as that memory
will get recycled.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
contrib/plugins/execlog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index 82dc2f584e2..f262e5555eb 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)
--
2.39.2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic