- Return early if NBAddNeighbor or RouterAddRoute fails
authorCameron Gutman <aicommander@gmail.com>
Fri, 26 Sep 2008 03:23:56 +0000 (03:23 +0000)
committerCameron Gutman <aicommander@gmail.com>
Fri, 26 Sep 2008 03:23:56 +0000 (03:23 +0000)
 - Fixes coverity error 389

svn path=/branches/aicom-network-fixes/; revision=36526

lib/drivers/ip/network/ip.c

index 2a5c4fd..d49f15d 100644 (file)
@@ -242,12 +242,14 @@ VOID IPAddInterfaceRoute( PIP_INTERFACE IF ) {
                        NUD_PERMANENT);
     if (!NCE) {
        TI_DbgPrint(MIN_TRACE, ("Could not create NCE.\n"));
+        return;
     }
 
     AddrWidenAddress( &NetworkAddress, &IF->Unicast, &IF->Netmask );
 
     if (!RouterAddRoute(&NetworkAddress, &IF->Netmask, NCE, 1)) {
        TI_DbgPrint(MIN_TRACE, ("Could not add route due to insufficient resources.\n"));
+        return;
     }
 
     /* Allow TCP to hang some configuration on this interface */