Signed-off-by: Het Gala <het.g...@nutanix.com> --- tests/qtest/migration-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c index b2a90469fb..3b72cad6c1 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -131,7 +131,7 @@ static void migrate_set_ports(QTestState *to, QList *channel_list) { QDict *addr; QListEntry *entry; - g_autofree const char *addr_port = NULL; + const char *addr_port = NULL; addr = migrate_get_connect_qdict(to); @@ -143,7 +143,7 @@ static void migrate_set_ports(QTestState *to, QList *channel_list) qdict_haskey(addr, "port") && (strcmp(qdict_get_str(addrdict, "port"), "0") == 0)) { addr_port = qdict_get_str(addr, "port"); - qdict_put_str(addrdict, "port", addr_port); + qdict_put_str(addrdict, "port", g_strdup(addr_port)); } } -- 2.22.3