]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Fix a memory leak on 5717+ devices
authorMatt Carlson <mcarlson@broadcom.com>
Sat, 5 Jun 2010 17:24:32 +0000 (17:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2010 00:55:59 +0000 (17:55 -0700)
commit53286a062c2b1d9f451c4c9521c2d3467a6b3966
treeb411e94456bd6af04621648bb288b803915fc9b6
parent387aa01e000f2e6cb96ce735c0ead218cd2cddea
tg3: Fix a memory leak on 5717+ devices

The rx resources for MSI-X interrupt vector 0 were not being freed
correctly.  This happens because the teardown loop continue's to the
next loop iteration if it detects the tx ring for that vector is not
setup, thus bypassing the rx teardown code.  This patch moves the
call to tg3_rx_prodring_free() earlier in the loop.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c