[coverity] 1543930 Dereference after null check

This commit is contained in:
akallabeth 2024-04-12 10:21:49 +02:00 committed by akallabeth
parent 581c9f1798
commit e88cb403bb
1 changed files with 3 additions and 4 deletions

View File

@ -396,14 +396,13 @@ static void dvcman_channel_free(DVCMAN_CHANNEL* channel)
static void dvcman_channel_unref(DVCMAN_CHANNEL* channel)
{
DVCMAN* dvcman = NULL;
WINPR_ASSERT(channel);
if (InterlockedDecrement(&channel->refCounter))
return;
dvcman = channel->dvcman;
HashTable_Remove(dvcman->channelsById, &channel->channel_id);
DVCMAN* dvcman = channel->dvcman;
if (dvcman)
HashTable_Remove(dvcman->channelsById, &channel->channel_id);
}
static UINT dvcchannel_send_close(DVCMAN_CHANNEL* channel)