mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
qemu: agent: use g_auto in qemuAgentGetInterfaces
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
9e48b02840
commit
00311ef603
@ -2216,12 +2216,12 @@ qemuAgentGetInterfaces(qemuAgentPtr agent,
|
|||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
size_t i;
|
size_t i;
|
||||||
virJSONValuePtr cmd = NULL;
|
g_autoptr(virJSONValue) cmd = NULL;
|
||||||
virJSONValuePtr reply = NULL;
|
g_autoptr(virJSONValue) reply = NULL;
|
||||||
virJSONValuePtr ret_array = NULL;
|
virJSONValuePtr ret_array = NULL;
|
||||||
size_t ifaces_count = 0;
|
size_t ifaces_count = 0;
|
||||||
virDomainInterfacePtr *ifaces_ret = NULL;
|
virDomainInterfacePtr *ifaces_ret = NULL;
|
||||||
virHashTablePtr ifaces_store = NULL;
|
g_autoptr(virHashTable) ifaces_store = NULL;
|
||||||
|
|
||||||
/* Hash table to handle the interface alias */
|
/* Hash table to handle the interface alias */
|
||||||
ifaces_store = virHashNew(NULL);
|
ifaces_store = virHashNew(NULL);
|
||||||
@ -2250,9 +2250,6 @@ qemuAgentGetInterfaces(qemuAgentPtr agent,
|
|||||||
ret = ifaces_count;
|
ret = ifaces_count;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
|
||||||
virJSONValueFree(reply);
|
|
||||||
virHashFree(ifaces_store);
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user