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
1 changed files with 2 additions and 0 deletions

View File

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