1
0
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:
John Ferlan 2015-01-16 06:40:15 -05:00
parent d7565bd8aa
commit ec010a55e7

View File

@ -52,6 +52,8 @@ struct _virNetworkRouteDef {
void
virNetworkRouteDefFree(virNetworkRouteDefPtr def)
{
if (!def)
return;
VIR_FREE(def->family);
VIR_FREE(def);
}