Reset pointer to NULL after free.

This commit is contained in:
akallabeth 2020-05-19 15:18:55 +02:00
parent 354bb7d6ae
commit cac8c365f2
2 changed files with 1 additions and 6 deletions

View File

@ -347,6 +347,7 @@ static void dvcman_channel_free(void* arg)
if (channel->channel_callback)
{
IFCALL(channel->channel_callback->OnClose, channel->channel_callback);
channel->channel_callback = NULL;
}
if (channel->status == CHANNEL_RC_OK)

View File

@ -1826,12 +1826,6 @@ static UINT rdpgfx_on_close(IWTSVirtualChannelCallback* pChannelCallback)
free_surfaces(context, gfx->SurfaceTable);
evict_cache_slots(context, gfx->MaxCacheSlots, gfx->CacheSlots);
if (gfx->listener_callback)
{
free(gfx->listener_callback);
gfx->listener_callback = NULL;
}
free(callback);
gfx->UnacknowledgedFrames = 0;
gfx->TotalDecodedFrames = 0;