[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

@@ -474,7 +474,7 @@ static UINT disp_server_open(DispServerContext* context)
return CHANNEL_RC_OK;
out_close:
WTSVirtualChannelClose(priv->disp_channel);
(void)WTSVirtualChannelClose(priv->disp_channel);
priv->disp_channel = NULL;
priv->channelEvent = NULL;
return rc;
@@ -567,7 +567,7 @@ static UINT disp_server_close(DispServerContext* context)
if (priv->disp_channel)
{
WTSVirtualChannelClose(priv->disp_channel);
(void)WTSVirtualChannelClose(priv->disp_channel);
priv->disp_channel = NULL;
}