mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
conf: fix arg to virDomainPCIAddressSetExtensionFree()
This function clears out and frees a virDomainZPCIAddressIds object, so that's that's what it should take as its argument, *not* the pointer to a parent object that contains the object we want to free. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8fb0b08762
commit
eb8f62ce88
@ -944,15 +944,15 @@ virDomainPCIAddressReleaseAddr(virDomainPCIAddressSetPtr addrs,
|
||||
|
||||
|
||||
static void
|
||||
virDomainPCIAddressSetExtensionFree(virDomainPCIAddressSetPtr addrs)
|
||||
virDomainPCIAddressSetExtensionFree(virDomainZPCIAddressIdsPtr zpciIds)
|
||||
{
|
||||
if (!addrs || !addrs->zpciIds)
|
||||
if (!zpciIds)
|
||||
return;
|
||||
|
||||
g_clear_pointer(&addrs->zpciIds->uids, g_hash_table_unref);
|
||||
g_clear_pointer(&addrs->zpciIds->fids, g_hash_table_unref);
|
||||
g_clear_pointer(&zpciIds->uids, g_hash_table_unref);
|
||||
g_clear_pointer(&zpciIds->fids, g_hash_table_unref);
|
||||
|
||||
VIR_FREE(addrs->zpciIds);
|
||||
VIR_FREE(zpciIds);
|
||||
}
|
||||
|
||||
|
||||
@ -1001,7 +1001,7 @@ virDomainPCIAddressSetFree(virDomainPCIAddressSetPtr addrs)
|
||||
if (!addrs)
|
||||
return;
|
||||
|
||||
virDomainPCIAddressSetExtensionFree(addrs);
|
||||
virDomainPCIAddressSetExtensionFree(addrs->zpciIds);
|
||||
VIR_FREE(addrs->buses);
|
||||
VIR_FREE(addrs);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user