There's one case where the return value of virConfSetValue() is
not checked for and it's in xenFormatXLInputDevs() function.
Let's fix that.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/libxl/xen_xl.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
index 94268fb76d..e3ddae8827 100644
--- a/src/libxl/xen_xl.c
+++ b/src/libxl/xen_xl.c
@@ -1853,7 +1853,11 @@ xenFormatXLInputDevs(virConf *conf, virDomainDef *def)
goto error;
virConfFreeValue(usbdevices);
} else {
- virConfSetValue(conf, "usbdevice", usbdevices);
+ if (virConfSetValue(conf, "usbdevice", usbdevices) < 0) {
+ usbdevices = NULL;
+ goto error;
+ }
+ usbdevices = NULL;
}
} else {
VIR_FREE(usbdevices);
--
2.34.1