lapbeth: Release ->ethdev when unregistering device.
authorDavid S. Miller <davem@davemloft.net>
Sun, 4 May 2008 04:10:58 +0000 (21:10 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 May 2008 04:10:58 +0000 (21:10 -0700)
Otherwise it leaks forever.

Based upon a report by Roland <devzero@web.de>

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/lapbether.c

index b5860b97a93e4b5d5dc8f290707f4dab7eec23f4..24fd613466b7ea0925d5c98c5aada6a82a1fc6cc 100644 (file)
@@ -459,6 +459,7 @@ static void __exit lapbeth_cleanup_driver(void)
        list_for_each_safe(entry, tmp, &lapbeth_devices) {
                lapbeth = list_entry(entry, struct lapbethdev, node);
 
+               dev_put(lapbeth->ethdev);
                unregister_netdevice(lapbeth->axdev);
        }
        rtnl_unlock();