Commit Message

When cycling the interface down and up, bnx2x_init_firmware() knows that
the firmware is already loaded, but nevertheless it allocates certain
arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old
arrays are leaked.
Fix the leaks by returning early if the firmware was already loaded.
Because if the firmware is loaded, so are the arrays.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 50 ++++++++++-----------
1 files changed, 24 insertions(+), 26 deletions(-)

From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Fri, 16 Mar 2012 09:24:34 +0200
> On Fri, 2012-03-16 at 01:08 +0100, Michal Schmidt wrote:>> When cycling the interface down and up, bnx2x_init_firmware() knows that>> the firmware is already loaded, but nevertheless it allocates certain>> arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old>> arrays are leaked.>> >> Fix the leaks by returning early if the firmware was already loaded.>> Because if the firmware is loaded, so are the arrays.>> >> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>> > > Acked-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html