[PATCH v2 02/27] libxlMakeDomBuildInfo: Don't use VIR_DISPOSE_N for USB device list

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

 



The list isn't secret which would need being disposed of. Just expand
the array and return failure when adding the NULL terminator similarly
to how we expand the list for adding devices in a loop.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/libxl/libxl_conf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 6a8ae27f54..cb1fd7df7d 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -686,7 +686,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
         /* NULL-terminate usbdevice_list */
         if (nusbdevice > 0 &&
             VIR_EXPAND_N(b_info->u.hvm.usbdevice_list, nusbdevice, 1) < 0) {
-            VIR_DISPOSE_N(b_info->u.hvm.usbdevice_list, nusbdevice);
             return -1;
         }
 #endif
-- 
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