mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
remote: Fix cached hypervisor type
Commit 501825011c
switched the remote driver to using g_auto, but missed
one case of needing to steal a pointer holding the hypervisor type.
Without it, memory is freed and the output of 'virsh version' has random
output
Compiled against library: libvirt 10.0.0
Using library: libvirt 10.0.0
Using API: ��%�U 10.0.0
Running hypervisor: ��U 8.1.3
Ths change also fixes random SIGABRT from perl processes running
libvirt-tck tests.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
fba411a805
commit
1a2f33cb59
@ -1408,7 +1408,7 @@ remoteConnectGetType(virConnectPtr conn)
|
||||
return NULL;
|
||||
|
||||
/* Stash. */
|
||||
return priv->type = ret.type;
|
||||
return priv->type = g_steal_pointer(&ret.type);
|
||||
}
|
||||
|
||||
static int remoteConnectIsSecure(virConnectPtr conn)
|
||||
|
Loading…
Reference in New Issue
Block a user