1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

virNetworkLoadState: Disallow mangled 'floor' element

In the network status XML we may have the <floor/> element with the
'sum' attribute. The attribute represents sum of all 'floor'-s of
computed over each interface connected to the network (this is needed to
guarantee certain bandwidth for certain domain). The sum is therefore a
number. However, if the number was mangled (e.g. by an user's
interference to network status file), we've just ignored it without
refusing to parse such file. This was all due to 'goto error' missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2014-02-10 19:26:16 +01:00
parent 9bf629ab60
commit 28900766d5

View File

@ -2959,6 +2959,7 @@ virNetworkLoadState(virNetworkObjListPtr nets,
_("Malformed 'floor_sum' attribute: %s"), _("Malformed 'floor_sum' attribute: %s"),
floor_sum); floor_sum);
VIR_FREE(floor_sum); VIR_FREE(floor_sum);
goto error;
} }
VIR_FREE(floor_sum); VIR_FREE(floor_sum);
} }