The LsaFreeMemory function frees memory allocated for an output buffer by an LSA function call. LSA functions that return variable-length output buffers always allocate the buffer on behalf of the caller. The caller must free this memory by passing the returned buffer pointer to LsaFreeMemory when the memory is no longer required.
Syntax
NTSTATUS LsaFreeMemory(
__in PVOID Buffer
);
Parameters
- Buffer [in]
-
Pointer to memory buffer that was allocated by an LSA function call. If LsaFreeMemory is successful, this buffer is freed.
Return Value
If the function succeeds, the return value is STATUS_SUCCESS.
If the function fails, the return value is an NTSTATUS code, which can be the following value or one of the
LSA Policy Function Return Values.
| Return code | Description |
- STATUS_UNSUCCESSFUL
| Memory could not be freed because it was not allocated by an LSA function call.
|
You can use the
LsaNtStatusToWinError function to convert the NTSTATUS code to a Windows error code.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | Ntsecapi.h |
| Library | Advapi32.lib |
| DLL | Advapi32.dll |
See Also
- LSA Policy Function Return Values
- LsaNtStatusToWinError
Send comments about this topic to Microsoft
Build date: 11/19/2009