Skip to content

Commit

Permalink
lapbeth: Release ->ethdev when unregistering device.
Browse files Browse the repository at this point in the history
Otherwise it leaks forever.

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

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 4, 2008
1 parent 41fef0e commit e544ff0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wan/lapbether.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e544ff0

Please sign in to comment.