]> xenbits.xensource.com Git - libvirt.git/commit
network: Check for QOS before blindly using it
authorJohn Ferlan <jferlan@redhat.com>
Tue, 12 Nov 2019 23:36:22 +0000 (18:36 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Nov 2019 12:02:08 +0000 (07:02 -0500)
commitf4db846c32c0a1e99a0f62b340273e48f8a98ed3
tree88a1585a9df44a1901966b97fb1da8b76f7f4b12
parent10881fac46f881347272aa5ae11f42e0ebb62157
network: Check for QOS before blindly using it

If networkAllocatePort calls networkPlugBandwidth eventually the
port->bandwidth would be passed to virNetDevBandwidthPlug which
requires that the parameter is non-NULL.  Coverity additionally
notes that since (!port->bandwidth) is checked earlier in the
networkAllocatePort method that the subsequent call to blindly
use if for a function that requires it needs to check.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/network/bridge_driver.c