mirror of
https://github.com/reactos/reactos.git
synced 2024-11-07 07:00:19 +00:00
- 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:
parent
ac9f7a78b0
commit
17c1d9b828
1 changed files with 4 additions and 1 deletions
|
@ -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 );
|
||||||
|
|
Loading…
Reference in a new issue