sunvnet: clean up objects created in vnet_new() on vnet_exit()
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Wed, 16 Jul 2014 14:02:26 +0000 (10:02 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jul 2014 05:44:07 +0000 (22:44 -0700)
commita4b70a07ed12a71131cab7adce2ce91c71b37060
tree24ac5cfb9dc7db82254914b4f27e581be4a09b35
parent7a9810e7bd99c922d9cedf64dbaa5ef6be412295
sunvnet: clean up objects created in vnet_new() on vnet_exit()

Nothing cleans up the objects created by
vnet_new(), they are completely leaked.

vnet_exit(), after doing the vio_unregister_driver() to clean
up ports, should call a helper function that iterates over vnet_list
and cleans up those objects. This includes unregister_netdevice()
as well as free_netdev().

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Reviewed-by: Karl Volz <karl.volz@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet.c