MiniLocateAdapter never zeroed Adapter if the adapter didn't match,
  and never actually ever matched a name.  It always returned the
  last adapter in the list.

svn path=/trunk/; revision=11790
This commit is contained in:
Filip Navara 2004-11-23 23:51:01 +00:00
parent f8246d2f62
commit 842b2d68dc

View file

@ -489,7 +489,7 @@ MiniLocateDevice(
ASSERT(Adapter); ASSERT(Adapter);
NDIS_DbgPrint(DEBUG_MINIPORT, ("AdapterName = %wZ\n", &AdapterName)); NDIS_DbgPrint(DEBUG_MINIPORT, ("AdapterName = %wZ\n", AdapterName));
NDIS_DbgPrint(DEBUG_MINIPORT, ("DeviceName = %wZ\n", &Adapter->NdisMiniportBlock.MiniportName)); NDIS_DbgPrint(DEBUG_MINIPORT, ("DeviceName = %wZ\n", &Adapter->NdisMiniportBlock.MiniportName));
if (RtlCompareUnicodeString(AdapterName, &Adapter->NdisMiniportBlock.MiniportName, TRUE) == 0) if (RtlCompareUnicodeString(AdapterName, &Adapter->NdisMiniportBlock.MiniportName, TRUE) == 0)
@ -498,6 +498,7 @@ MiniLocateDevice(
break; break;
} }
Adapter = NULL;
CurrentEntry = CurrentEntry->Flink; CurrentEntry = CurrentEntry->Flink;
} }
} while (0); } while (0);