mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
hyperv: Use g_auto() for virHashTable in hypervCreateEmbeddedParam
This will allow us to drop 'error' label later. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
b54b229e74
commit
28065881f7
@ -318,7 +318,7 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
virHashTablePtr table = NULL;
|
g_autoptr(virHashTable) table = NULL;
|
||||||
XmlSerializerInfo *typeinfo = NULL;
|
XmlSerializerInfo *typeinfo = NULL;
|
||||||
XmlSerializerInfo *item = NULL;
|
XmlSerializerInfo *item = NULL;
|
||||||
hypervWmiClassInfoPtr classInfo = NULL;
|
hypervWmiClassInfoPtr classInfo = NULL;
|
||||||
@ -344,10 +344,9 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return table;
|
return g_steal_pointer(&table);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virHashFree(table);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user