FreeClientBuffer function

Frees a client buffer previously allocated with the AllocateClientBuffer function.


NTSTATUS FreeClientBuffer(
  _In_ PLSA_CLIENT_REQUEST ClientRequest,
  _In_ PVOID               ClientBaseAddress


ClientRequest [in]

Pointer to an opaque LSA_CLIENT_REQUEST data type containing information about the LSA client's request.

ClientBaseAddress [in]

Optional. Pointer to the buffer to be freed. This address is the virtual address of the buffer within the client process, not in the current process. If NULL is passed, no memory is freed. This allows the client to pass in a value returned to it by the LSA without knowing whether the LSA actually allocated a buffer.

Return value

If the function succeeds, the return value is STATUS_SUCCESS.

If the function fails, the return value is an NTSTATUS code. For more information, see LSA Policy Function Return Values.

The LsaNtStatusToWinError function converts an NTSTATUS code to a Windows error code.


Because this function frees pages in the client's process, it must be called with great care. Calling this function with an address that is not valid can cause the client process to crash.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]



See also