mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virconf: Report an error in when virConfSetValue() fails
Callers of virConfSetValue() don't report any error, they just pass the error blindly. Therefore, report an error when virConfSetValue() is about to fail. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -1329,6 +1329,9 @@ virConfSetValue(virConf *conf,
|
||||
virConfEntry *prev = NULL;
|
||||
|
||||
if (value && value->type == VIR_CONF_STRING && value->str == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("expecting a value for value of type %s"),
|
||||
virConfTypeToString(VIR_CONF_STRING));
|
||||
virConfFreeValue(value);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user