[winpr,wtsapi] improve API usage

* Mark WTSVirtualChannelOpen and WTSVirtualChannelOpenEx with
  WINPR_ATTR_MALLOC to enforce compiler checks for resource cleanup
* Fix unused result warnings, use the result or cast to (void) where not
  requierd
This commit is contained in:
akallabeth
2024-09-14 21:07:03 +02:00
parent a1cef8dd85
commit 8b6091a007
20 changed files with 55 additions and 39 deletions

View File

@@ -430,7 +430,7 @@ static DWORD WINAPI audin_server_thread_func(LPVOID arg)
out_capacity:
Stream_Free(s, TRUE);
out:
WTSVirtualChannelClose(audin->audin_channel);
(void)WTSVirtualChannelClose(audin->audin_channel);
audin->audin_channel = NULL;
if (error && audin->context.rdpcontext)
@@ -533,7 +533,7 @@ static BOOL audin_server_close(audin_server_context* context)
if (audin->audin_channel)
{
WTSVirtualChannelClose(audin->audin_channel);
(void)WTSVirtualChannelClose(audin->audin_channel);
audin->audin_channel = NULL;
}