mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemuRefreshVirtioChannelState: Automatically free GHashTable and refactor cleanup
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
54a975ded6
commit
b59430d107
@ -2243,24 +2243,21 @@ qemuRefreshVirtioChannelState(virQEMUDriver *driver,
|
||||
qemuDomainAsyncJob asyncJob)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
GHashTable *info = NULL;
|
||||
int ret = -1;
|
||||
g_autoptr(GHashTable) info = NULL;
|
||||
int rc;
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
ret = qemuMonitorGetChardevInfo(priv->mon, &info);
|
||||
rc = qemuMonitorGetChardevInfo(priv->mon, &info);
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
|
||||
if (ret < 0)
|
||||
goto cleanup;
|
||||
if (rc < 0)
|
||||
return -1;
|
||||
|
||||
qemuProcessRefreshChannelVirtioState(driver, vm, info, false);
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
virHashFree(info);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user