diff mbox series

[09/23] plugins/lockstep: preserve sock_path

Message ID 20240628124258.832466-10-alex.bennee@linaro.org
State New
Headers show
Series July maintainer updates (32bit, testing, plugins, gdbstub) | expand

Commit Message

Alex Bennée June 28, 2024, 12:42 p.m. UTC
We can't assign sock_path directly from the autofree'd GStrv, take a
copy.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 contrib/plugins/lockstep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index 237543b43a..111ec3fa27 100644
--- a/contrib/plugins/lockstep.c
+++ b/contrib/plugins/lockstep.c
@@ -347,7 +347,7 @@  QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
                 return -1;
             }
         } else if (g_strcmp0(tokens[0], "sockpath") == 0) {
-            sock_path = tokens[1];
+            sock_path = strdup(tokens[1]);
         } else {
             fprintf(stderr, "option parsing failed: %s\n", p);
             return -1;