Add missing NULL pointer check to DCB list handling
The thread specific list removal function didn't check whether the last item was NULL before proceeding to alter the latest tail pointer.
This commit is contained in:
parent
b32af705e6
commit
b09bf56127
@ -3446,7 +3446,11 @@ static void dcb_remove_from_list(DCB *dcb)
|
||||
{
|
||||
DCB *tail = all_dcbs[dcb->thread.id]->thread.tail;
|
||||
all_dcbs[dcb->thread.id] = all_dcbs[dcb->thread.id]->thread.next;
|
||||
all_dcbs[dcb->thread.id]->thread.tail = tail;
|
||||
|
||||
if (all_dcbs[dcb->thread.id])
|
||||
{
|
||||
all_dcbs[dcb->thread.id]->thread.tail = tail;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user