mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 20:51:26 +00:00
hyperv: use g_autoptr for Win32_OperatingSystem in hypervConnectOpen
Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
7c34b298db
commit
1c603b7c02
@ -1357,7 +1357,7 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|||||||
hypervPrivate *priv = NULL;
|
hypervPrivate *priv = NULL;
|
||||||
g_autofree char *username = NULL;
|
g_autofree char *username = NULL;
|
||||||
g_autofree char *password = NULL;
|
g_autofree char *password = NULL;
|
||||||
Win32_OperatingSystem *os = NULL;
|
g_autoptr(Win32_OperatingSystem) os = NULL;
|
||||||
|
|
||||||
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
||||||
|
|
||||||
@ -1421,7 +1421,6 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|||||||
result = VIR_DRV_OPEN_SUCCESS;
|
result = VIR_DRV_OPEN_SUCCESS;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
hypervFreeObject((hypervObject *)os);
|
|
||||||
hypervFreePrivate(&priv);
|
hypervFreePrivate(&priv);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user