From: David S. Miller Date: Sun, 4 May 2008 04:10:58 +0000 (-0700) Subject: lapbeth: Release ->ethdev when unregistering device. X-Git-Tag: v2.6.26-rc2~60^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e544ff00da4b53069dbca3debbfb02d455f72467;p=linux-2.6 lapbeth: Release ->ethdev when unregistering device. Otherwise it leaks forever. Based upon a report by Roland Signed-off-by: David S. Miller --- diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index b5860b97a9..24fd613466 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -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();