mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
fixed a potential 0-pointer deref
svn path=/trunk/; revision=5975
This commit is contained in:
parent
f0496db9c5
commit
0e0fac5636
1 changed files with 3 additions and 3 deletions
|
@ -503,7 +503,6 @@ VOID ProtocolBindAdapter(
|
|||
*/
|
||||
{
|
||||
/* we get to ignore BindContext because we will never pend an operation with NDIS */
|
||||
DbgPrint(("tcpip!ProtocolBindAdapter called\n"));
|
||||
TI_DbgPrint(DEBUG_DATALINK, ("Called.\n"));
|
||||
*Status = LANRegisterAdapter(DeviceName);
|
||||
}
|
||||
|
@ -629,13 +628,13 @@ VOID BindAdapter(
|
|||
Adapter->TDPackets = NULL;
|
||||
for (i = 0; i < 2; i++) {
|
||||
Packet = AllocateTDPacket(Adapter);
|
||||
PC(Packet)->Context = Adapter->TDPackets;
|
||||
Adapter->TDPackets = Packet;
|
||||
if (!Packet) {
|
||||
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
|
||||
FreeTDPackets(Adapter);
|
||||
return;
|
||||
}
|
||||
PC(Packet)->Context = Adapter->TDPackets;
|
||||
Adapter->TDPackets = Packet;
|
||||
}
|
||||
|
||||
/* Bind the adapter to IP layer */
|
||||
|
@ -761,6 +760,7 @@ NDIS_STATUS LANRegisterAdapter(
|
|||
/* Initialize array with media IDs we support */
|
||||
MediaArray[MEDIA_ETH] = NdisMedium802_3;
|
||||
|
||||
TI_DbgPrint(DEBUG_DATALINK,("opening adapter %wZ\n", AdapterName));
|
||||
/* Open the adapter. */
|
||||
NdisOpenAdapter(&NdisStatus,
|
||||
&OpenStatus,
|
||||
|
|
Loading…
Reference in a new issue