Add freerdp_nla_FreeContextBuffer()

This function should be used to free certain buffers retrieved using
freerdp_nla_QueryContextAttributes(). It fetches the right vfunc table
to call into, which typically ends up in sspi_FreeContextBuffer() in
sspi_winpr.c.

This is needed to allow querying the PackageInfo attribute.
This commit is contained in:
Jonas Ådahl
2026-01-22 11:01:20 +01:00
parent e327d97c59
commit e6aa564bd7
4 changed files with 37 additions and 0 deletions

View File

@@ -767,6 +767,17 @@ owned by rdpRdp */
FREERDP_API SECURITY_STATUS freerdp_nla_QueryContextAttributes(rdpContext* context,
DWORD ulAttr, PVOID pBuffer);
/** Calls FreeContextbuffer on the SSPI context associated with the NLA part of the RDP context
*
* \param context the RDP context
* \param pBuffer an opaque pointer to free
* \returns a SECURITY_STATUS indicating if the operation completed successfully
* \since version 3.22.0
*
* Supported buffers are ones retrieved from SECPKG_ATTR_PACKAGE_INFO.
*/
FREERDP_API SECURITY_STATUS freerdp_nla_FreeContextBuffer(rdpContext* context, PVOID pBuffer);
FREERDP_API void clearChannelError(rdpContext* context);
FREERDP_API HANDLE getChannelErrorEventHandle(rdpContext* context);
FREERDP_API UINT getChannelError(const rdpContext* context);