* put_device_interface() now also accepts a NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
edf1018372
commit
67678a989e
@ -357,13 +357,15 @@ list_device_interfaces(void* _buffer, size_t* bufferSize)
|
||||
void
|
||||
put_device_interface(struct net_device_interface* interface)
|
||||
{
|
||||
if (interface == NULL)
|
||||
return;
|
||||
|
||||
if (atomic_add(&interface->ref_count, -1) != 1)
|
||||
return;
|
||||
|
||||
{
|
||||
MutexLocker locker(sLock);
|
||||
sInterfaces.Remove(interface);
|
||||
}
|
||||
MutexLocker locker(sLock);
|
||||
sInterfaces.Remove(interface);
|
||||
locker.Unlock();
|
||||
|
||||
uninit_fifo(&interface->receive_queue);
|
||||
status_t status;
|
||||
|
Loading…
Reference in New Issue
Block a user