mirror of https://gitee.com/openkylin/libvirt.git
network: Resolve Coverity FORWARD_NULL
Commit id 'ca481a6f' added virNetworkRouteDefFree which may be called in an error path from lxcAddNetworkRouteDefinition with 'route = NULL'. So just add the (!def) at the top to resolve.
This commit is contained in:
parent
d7565bd8aa
commit
ec010a55e7
|
@ -52,6 +52,8 @@ struct _virNetworkRouteDef {
|
|||
void
|
||||
virNetworkRouteDefFree(virNetworkRouteDefPtr def)
|
||||
{
|
||||
if (!def)
|
||||
return;
|
||||
VIR_FREE(def->family);
|
||||
VIR_FREE(def);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue