[libvirt] [PATCH 8/9] libxl: Resolve Coverity CHECKED_RETURN
John Ferlan
jferlan at redhat.com
Fri Sep 12 00:06:04 UTC 2014
Add a check of the return for virDomainHostdevInsert() like every
other call.
Signed-off-by: John Ferlan <jferlan at redhat.com>
---
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
More information about the libvir-list
mailing list