rdpsnd: fix some null pointer crashes.
This commit is contained in:
parent
104ff8169d
commit
ec54a44449
@ -650,12 +650,15 @@ static void rdpsnd_process_terminate(rdpSvcPlugin* plugin)
|
||||
if (rdpsnd->device)
|
||||
IFCALL(rdpsnd->device->Free, rdpsnd->device);
|
||||
|
||||
while ((item = list_dequeue(rdpsnd->data_out_list)) != NULL)
|
||||
if (rdpsnd->data_out_list)
|
||||
{
|
||||
stream_free(item->data_out);
|
||||
free(item);
|
||||
while ((item = list_dequeue(rdpsnd->data_out_list)) != NULL)
|
||||
{
|
||||
stream_free(item->data_out);
|
||||
free(item);
|
||||
}
|
||||
list_free(rdpsnd->data_out_list);
|
||||
}
|
||||
list_free(rdpsnd->data_out_list);
|
||||
|
||||
if (rdpsnd->subsystem)
|
||||
free(rdpsnd->subsystem);
|
||||
|
@ -338,16 +338,22 @@ static void svc_plugin_process_terminated(rdpSvcPlugin* plugin)
|
||||
{
|
||||
svc_data_in_item* item;
|
||||
|
||||
freerdp_thread_stop(plugin->priv->thread);
|
||||
freerdp_thread_free(plugin->priv->thread);
|
||||
if (plugin->priv->thread)
|
||||
{
|
||||
freerdp_thread_stop(plugin->priv->thread);
|
||||
freerdp_thread_free(plugin->priv->thread);
|
||||
}
|
||||
|
||||
plugin->channel_entry_points.pVirtualChannelClose(plugin->priv->open_handle);
|
||||
|
||||
svc_plugin_remove(plugin);
|
||||
|
||||
while ((item = list_dequeue(plugin->priv->data_in_list)) != NULL)
|
||||
svc_data_in_item_free(item);
|
||||
list_free(plugin->priv->data_in_list);
|
||||
if (plugin->priv->data_in_list)
|
||||
{
|
||||
while ((item = list_dequeue(plugin->priv->data_in_list)) != NULL)
|
||||
svc_data_in_item_free(item);
|
||||
list_free(plugin->priv->data_in_list);
|
||||
}
|
||||
|
||||
if (plugin->priv->data_in != NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user