core: unify function behaviour of WTSVirtualChannelQuery
With all calls when WTSVirtualChannelQuery returns FALSE that means that no ppBuffer was allocated, that was not the case with class=WTSVirtualChannelReady. Most callers were not aware of that, leading to leaks for example when the channel is not available client-side, the patch changes that so that you have to call call WTSFreeMemory only if WTSVirtualChannelQuery returned TRUE.
This commit is contained in:
parent
bee2873b52
commit
73495a1576
@ -1693,9 +1693,9 @@ BOOL WINAPI FreeRDP_WTSVirtualChannelQuery(HANDLE hChannelHandle, WTS_VIRTUAL_CL
|
||||
break;
|
||||
|
||||
default:
|
||||
bval = FALSE;
|
||||
status = FALSE;
|
||||
break;
|
||||
*ppBuffer = NULL;
|
||||
*pBytesReturned = 0;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user