check if the device going down is the head of the check list and remove it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos 2007-04-06 06:23:27 +00:00
parent 2c24a1a9f6
commit 0b10ed0573

View File

@ -216,7 +216,8 @@ ethernet_down(net_device *_device)
// if the device is still part of the list, remove it
if (device->GetDoublyLinkedListLink()->next != NULL
|| device->GetDoublyLinkedListLink()->previous != NULL)
|| device->GetDoublyLinkedListLink()->previous != NULL
|| device == sCheckList.Head())
sCheckList.Remove(device);
close(device->fd);