[PATCH 8/9] libxl: Resolve Coverity CHECKED_RETURN

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

 



Add a check of the return for virDomainHostdevInsert() like every
other call.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/libxl/libxl_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 17d6257..2f2c590 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2891,7 +2891,8 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
                 return -1;
             }
 
-            virDomainHostdevInsert(vmdef, hostdev);
+            if (virDomainHostdevInsert(vmdef, hostdev) < 0)
+                return -1;
             break;
 
         default:
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]