Set pEntryPointsEx->ppInterface NULL on error.
This commit is contained in:
parent
88a3b8dd76
commit
64590e7e89
@ -1235,7 +1235,7 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
{
|
||||
UINT rc;
|
||||
cliprdrPlugin* cliprdr;
|
||||
CliprdrClientContext* context;
|
||||
CliprdrClientContext* context = NULL;
|
||||
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
|
||||
cliprdr = (cliprdrPlugin*) calloc(1, sizeof(cliprdrPlugin));
|
||||
|
||||
@ -1298,6 +1298,9 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
{
|
||||
WLog_ERR(TAG, "pVirtualChannelInit failed with %s [%08X]",
|
||||
WTSErrorToString(rc), rc);
|
||||
if (context)
|
||||
*(pEntryPointsEx->ppInterface) = NULL;
|
||||
|
||||
free(cliprdr->context);
|
||||
free(cliprdr);
|
||||
return FALSE;
|
||||
|
@ -1469,7 +1469,7 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
{
|
||||
UINT rc;
|
||||
drdynvcPlugin* drdynvc;
|
||||
DrdynvcClientContext* context;
|
||||
DrdynvcClientContext* context = NULL;
|
||||
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
|
||||
drdynvc = (drdynvcPlugin*) calloc(1, sizeof(drdynvcPlugin));
|
||||
|
||||
@ -1519,6 +1519,9 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
{
|
||||
WLog_ERR(TAG, "pVirtualChannelInit failed with %s [%08X]",
|
||||
WTSErrorToString(rc), rc);
|
||||
if (context)
|
||||
*(pEntryPointsEx->ppInterface) = NULL;
|
||||
|
||||
free(drdynvc->context);
|
||||
free(drdynvc);
|
||||
return FALSE;
|
||||
|
@ -1232,7 +1232,7 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
{
|
||||
UINT rc;
|
||||
encomspPlugin* encomsp;
|
||||
EncomspClientContext* context;
|
||||
EncomspClientContext* context = NULL;
|
||||
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
|
||||
BOOL isFreerdp = FALSE;
|
||||
encomsp = (encomspPlugin*) calloc(1, sizeof(encomspPlugin));
|
||||
@ -1301,6 +1301,8 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
s_TLSPluginContext = encomsp;
|
||||
return TRUE;
|
||||
error_out:
|
||||
if (context)
|
||||
*(pEntryPointsEx->ppInterface) = NULL;
|
||||
|
||||
if (isFreerdp)
|
||||
free(encomsp->context);
|
||||
|
@ -759,7 +759,7 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
{
|
||||
UINT rc;
|
||||
railPlugin* rail;
|
||||
RailClientContext* context;
|
||||
RailClientContext* context = NULL;
|
||||
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
|
||||
BOOL isFreerdp = FALSE;
|
||||
rail = (railPlugin*) calloc(1, sizeof(railPlugin));
|
||||
@ -840,6 +840,9 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
return TRUE;
|
||||
error_out:
|
||||
|
||||
if (context)
|
||||
*(pEntryPointsEx->ppInterface) = NULL;
|
||||
|
||||
if (isFreerdp)
|
||||
free(rail->context);
|
||||
|
||||
|
@ -1460,6 +1460,12 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
UINT rc;
|
||||
rdpsndPlugin* rdpsnd;
|
||||
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
|
||||
|
||||
if (!pEntryPoints)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rdpsnd = (rdpsndPlugin*) calloc(1, sizeof(rdpsndPlugin));
|
||||
|
||||
if (!rdpsnd)
|
||||
|
@ -1034,6 +1034,12 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
remdeskPlugin* remdesk;
|
||||
RemdeskClientContext* context = NULL;
|
||||
CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
|
||||
|
||||
if (!pEntryPoints)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
remdesk = (remdeskPlugin*) calloc(1, sizeof(remdeskPlugin));
|
||||
|
||||
if (!remdesk)
|
||||
@ -1088,6 +1094,8 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
s_TLSPluginContext = remdesk;
|
||||
return TRUE;
|
||||
error_out:
|
||||
if (context)
|
||||
*(pEntryPointsEx->ppInterface) = NULL;
|
||||
free(remdesk);
|
||||
free(context);
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user