[PATCH 26/55] hyperv: use g_autoptr for Msvm_DiskDrive in hypervDomainDefParsePhysicalDisk

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

 



Signed-off-by: Matt Coleman <matt@xxxxxxxxx>
---
 src/hyperv/hyperv_driver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 06eee379a1..40e4c97d35 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -1101,7 +1101,7 @@ hypervDomainDefParsePhysicalDisk(hypervPrivate *priv,
 {
     int result = -1;
     Msvm_ResourceAllocationSettingData *controller = NULL;
-    Msvm_DiskDrive *diskdrive = NULL;
+    g_autoptr(Msvm_DiskDrive) diskdrive = NULL;
     virDomainDiskDefPtr disk = NULL;
     char **hostResource = entry->data->HostResource.data;
     g_autofree char *hostEscaped = NULL;
@@ -1188,7 +1188,6 @@ hypervDomainDefParsePhysicalDisk(hypervPrivate *priv,
  cleanup:
     if (result != 0 && disk)
         virDomainDiskDefFree(disk);
-    hypervFreeObject((hypervObject *)diskdrive);
 
     return result;
 }
-- 
2.30.0





[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