mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00: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:
parent
ad051d2a74
commit
dfda149e15
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user