bonding: Clean up resource leaks
authorJay Vosburgh <fubar@us.ibm.com>
Fri, 31 Oct 2008 00:41:15 +0000 (17:41 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 31 Oct 2008 04:46:04 +0000 (00:46 -0400)
commita434e43f3d844192bc23bd7b408bac979c40efe7
treec14f191bafc78a1194815e0e9df5223dd52e8d99
parentfba4acda35f3119328bcba28aacefae14245d2bb
bonding: Clean up resource leaks

This patch reworks the resource free logic performed at the time
a bonding device is released.  This (a) closes two resource leaks, one
for workqueues and one for multicast lists, and (b) improves commonality
of code between the "destroy one" and "destroy all" paths by performing
final free activity via destructor instead of explicitly (and differently)
in each path.

"Sean E. Millichamp" <sean@bruenor.org> reported the workqueue
leak, and included a different patch.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/bonding/bond_main.c