qemu: replace explicit virNetworkDefFree() with g_autoptr(virNetworkDef)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Laine Stump 2022-08-18 13:25:32 -04:00
parent bea8da6b12
commit 175d8a0852

View File

@ -4828,7 +4828,7 @@ qemuProcessGetNetworkAddress(const char *netname,
g_autoptr(virConnect) conn = NULL;
int ret = -1;
g_autoptr(virNetwork) net = NULL;
virNetworkDef *netdef = NULL;
g_autoptr(virNetworkDef) netdef = NULL;
virNetworkIPDef *ipdef;
virSocketAddr addr;
virSocketAddr *addrptr = NULL;
@ -4912,7 +4912,6 @@ qemuProcessGetNetworkAddress(const char *netname,
ret = 0;
cleanup:
virNetworkDefFree(netdef);
return ret;
}