mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 23:24:23 +03:00
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…
x
Reference in New Issue
Block a user