]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: Resolve Coverity CHECKED_RETURN
authorJohn Ferlan <jferlan@redhat.com>
Thu, 11 Sep 2014 21:52:58 +0000 (17:52 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 12 Sep 2014 10:12:50 +0000 (06:12 -0400)
Add a check of the return for virDomainHostdevInsert() like every
other call.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/libxl/libxl_driver.c

index 17d6257bf4052970f5a705bfef90f855a134764b..2f2c590ee99fa683b7a072cff4e71f698a6bb966 100644 (file)
@@ -2891,7 +2891,8 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
                 return -1;
             }
 
-            virDomainHostdevInsert(vmdef, hostdev);
+            if (virDomainHostdevInsert(vmdef, hostdev) < 0)
+                return -1;
             break;
 
         default: