conf: Run virDomainInputDefPostParse() only for VIR_DOMAIN_DEVICE_INPUT

Due to missed break; statement the virDomainInputDefPostParse()
is called not only for VIR_DOMAIN_DEVICE_INPUT but also
VIR_DOMAIN_DEVICE_LEASE and VIR_DOMAIN_DEVICE_NET, which can lead
to all sort of unpredictable results.

Fixes: c4bc4d3b82
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2023-05-26 16:15:56 +02:00
parent 997994b6b1
commit f08309d868

View File

@ -725,12 +725,13 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDef *dev,
ret = virDomainFSDefPostParse(dev->data.fs); ret = virDomainFSDefPostParse(dev->data.fs);
break; break;
case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_NET:
case VIR_DOMAIN_DEVICE_INPUT: case VIR_DOMAIN_DEVICE_INPUT:
virDomainInputDefPostParse(dev->data.input, def); virDomainInputDefPostParse(dev->data.input, def);
ret = 0; ret = 0;
break; break;
case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_NET:
case VIR_DOMAIN_DEVICE_SOUND: case VIR_DOMAIN_DEVICE_SOUND:
case VIR_DOMAIN_DEVICE_WATCHDOG: case VIR_DOMAIN_DEVICE_WATCHDOG:
case VIR_DOMAIN_DEVICE_GRAPHICS: case VIR_DOMAIN_DEVICE_GRAPHICS: