From: David S. Miller Date: Sun, 4 May 2008 04:10:58 +0000 (-0700) Subject: lapbeth: Release ->ethdev when unregistering device. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e544ff00da4b53069dbca3debbfb02d455f72467;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 b5860b97a93e..24fd613466b7 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();