mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
xen_xl: Check for virConfSetValue() retval
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@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
dfda149e15
commit
8b12f6af0b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user