[core,transport] only free userContext if userContextSize > 0

This commit is contained in:
Armin Novak
2025-05-28 09:43:39 +02:00
parent 07ceeb1f91
commit 7a89e47334
2 changed files with 20 additions and 8 deletions

View File

@@ -148,8 +148,12 @@ extern "C"
/**
* @brief Create new transport layer instance
*
* @bug Before 3.16.0 the rdpTransportLayer::userContext was freed unconditionally
*
* @param transport A pointer to the transport instance to use
* @param contextSize The size of the context to use
* @param contextSize The size of the context to use. If \b 0 no rdpTransportLayer::userContext
* is allocated or freed.
* @return A new transport layer instance or \b NULL in case of failure
* @since version 3.9.0
*/