- Check that we successfully allocated memory

- Return TDI_NO_RESOURCES instead of STATUS_NO_MEMORY

svn path=/branches/aicom-network-fixes/; revision=35783
This commit is contained in:
Cameron Gutman 2008-08-30 02:04:30 +00:00
parent ac9f7a78b0
commit 17c1d9b828

View file

@ -27,6 +27,9 @@ TDI_STATUS InfoTdiQueryGetAddrTable( PNDIS_BUFFER Buffer,
TI_DbgPrint(DEBUG_INFO, ("Called.\n")); TI_DbgPrint(DEBUG_INFO, ("Called.\n"));
if (!IpAddress)
return TDI_NO_RESOURCES;
TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql); TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql);
ForEachInterface(CurrentIF) { ForEachInterface(CurrentIF) {
@ -80,7 +83,7 @@ TDI_STATUS InfoTdiQueryGetRouteTable( PNDIS_BUFFER Buffer, PUINT BufferSize ) {
if( !RCache || !RouteEntries ) { if( !RCache || !RouteEntries ) {
if( RCache ) ExFreePool( RCache ); if( RCache ) ExFreePool( RCache );
if( RouteEntries ) ExFreePool( RouteEntries ); if( RouteEntries ) ExFreePool( RouteEntries );
return STATUS_NO_MEMORY; return TDI_NO_RESOURCES;
} }
RtlZeroMemory( RouteEntries, Size ); RtlZeroMemory( RouteEntries, Size );