Partager via


NdisFreeBuffer function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisFreeBuffer releases a buffer descriptor obtained in a preceding call to NdisAllocateBuffer or NdisCopyBuffer.

Syntax

VOID NdisFreeBuffer(
  _In_ PNDIS_BUFFER Buffer
);

Parameters

  • Buffer [in]
    Pointer to a buffer descriptor.

Return value

None

Remarks

NdisFreeBuffer returns the given buffer descriptor to the free list.

A driver must not call NdisFreePacket with a packet to which buffers are chained, because doing this causes a memory leak. Before it releases such a packet, either the driver should call NdisFreeBuffer as many times as necessary to release all buffer descriptors chained to the packet, or it should call either NdisUnchainBufferAtXxx function as many times as necessary to save the pointers to all chained buffer descriptors.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisFreeMdl instead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

NdisAllocateBuffer

NdisCopyBuffer

NdisFreePacket

NdisReleaseSpinLock

NdisUnchainBufferAtBack

NdisUnchainBufferAtFront

 

 

Send comments about this topic to Microsoft