* put_device_interface() accessed "device" which was already freed to get

the module name, possibly causing a crash when you delete an interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27950 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-10-10 18:38:12 +00:00
parent 057e9d6386
commit ea93f584ad
@@ -442,8 +442,9 @@ put_device_interface(struct net_device_interface *interface)
wait_for_thread(interface->consumer_thread, &status);
net_device *device = interface->device;
const char* moduleName = device->module->info.name;
device->module->uninit_device(device);
put_module(device->module->info.name);
put_module(moduleName);
recursive_lock_destroy(&interface->rx_lock);
delete interface;