igb: fix memory leak when setting ring size while interface is down
authorAlexander Duyck <alexander.h.duyck@intel.com>
Mon, 26 Oct 2009 11:31:47 +0000 (11:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Oct 2009 23:08:56 +0000 (16:08 -0700)
commit6d9f4fc420571ab67c962ef0d94449127218f66e
treeae459220577e6435473a7a94e0a32947b826bf5b
parentd3da68310a2cf934c2ea8a99a519d8b1ccca4c56
igb: fix memory leak when setting ring size while interface is down

Changing ring sizes while the interface was down was causing a double
allocation of the receive and transmit rings.  This issue is amplified when
there are multiple rings enabled.  To prevent this we need to add an
additional check which will just update the ring counts when the interface
is not up and skip the allocation steps.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/igb/igb_ethtool.c