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: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Showing
想要评论请 注册 或 登录