In e1000_loopback_test, make sure to call e1000_free_desc_rings if e1000_setup_loopback_test fails. Currently in that case it will not get called, causing a leak.
Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/e1000/e1000_ethtool.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) applies-to: 841d5e5eeda46fd95ac03c36964919818a9bc3a6 c2184efd0b58ddb1b80ac2038944e935a21db96a diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 8eae8ba..8584e93 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -1440,9 +1440,11 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data) { if((*data = e1000_setup_desc_rings(adapter))) goto err_loopback; - if((*data = e1000_setup_loopback_test(adapter))) goto err_loopback; + if((*data = e1000_setup_loopback_test(adapter))) + goto err_loopback_setup; *data = e1000_run_loopback_test(adapter); e1000_loopback_cleanup(adapter); +err_loopback_setup: e1000_free_desc_rings(adapter); err_loopback: return *data; --- 0.99.9.GIT -- John W. Linville [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html