mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
hyperv: g_autofree username and password in hypervConnectOpen()
Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
85c8c29214
commit
f5dadf9a71
@ -421,8 +421,8 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|||||||
{
|
{
|
||||||
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
|
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
|
||||||
hypervPrivate *priv = NULL;
|
hypervPrivate *priv = NULL;
|
||||||
char *username = NULL;
|
g_autofree char *username = NULL;
|
||||||
char *password = NULL;
|
g_autofree char *password = NULL;
|
||||||
|
|
||||||
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
||||||
|
|
||||||
@ -472,8 +472,6 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
hypervFreePrivate(&priv);
|
hypervFreePrivate(&priv);
|
||||||
VIR_FREE(username);
|
|
||||||
VIR_FREE(password);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user