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:
Laine Stump 2021-01-30 14:02:28 -05:00
parent 8fb0b08762
commit eb8f62ce88

View File

@ -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);
}