[PATCH 4/8] conf: fix arg to virDomainPCIAddressSetExtensionFree()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/domain_addr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index a8648d5858..4ba620086d 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -944,15 +944,15 @@ virDomainPCIAddressReleaseAddr(virDomainPCIAddressSetPtr addrs,
 
 
 static void
-virDomainPCIAddressSetExtensionFree(virDomainPCIAddressSetPtr addrs)
+virDomainPCIAddressSetExtensionFree(virDomainZPCIAddressIdsPtr zpciIds)
 {
-    if (!addrs || !addrs->zpciIds)
+    if (!zpciIds)
         return;
 
-    virHashFree(addrs->zpciIds->uids);
-    virHashFree(addrs->zpciIds->fids);
+    virHashFree(zpciIds->uids);
+    virHashFree(zpciIds->fids);
 
-    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);
 }
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux