linux/drivers/net/ethernet/broadcom/bnx2x
Michal Schmidt c0ea452e42 bnx2x: fix memory leak in bnx2x_init_firmware()
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16 01:57:26 -07:00
..
bnx2x.h bnx2x, cnic: support DRV_INFO upon FW request 2011-12-06 13:06:05 -05:00
bnx2x_cmn.c bnx2x: dcb bit indices flags used as bits 2012-03-12 17:01:25 -07:00
bnx2x_cmn.h bnx2x: FCoE statistics id fixed 2012-03-12 17:01:25 -07:00
bnx2x_dcb.c bnx2x: dcb bit indices flags used as bits 2012-03-12 17:01:25 -07:00
bnx2x_dcb.h bnx2x: DCBX: use #define instead of magic 2011-11-13 16:03:54 -05:00
bnx2x_dump.h
bnx2x_ethtool.c bnx2x: fix Big-Endianess in ethtool -t 2012-01-23 13:58:18 -05:00
bnx2x_fw_defs.h
bnx2x_fw_file_hdr.h
bnx2x_hsi.h bnx2x, cnic: support DRV_INFO upon FW request 2011-12-06 13:06:05 -05:00
bnx2x_init.h
bnx2x_init_ops.h
bnx2x_link.c bnx2x: Disable AN KR work-around for BCM57810 2012-01-17 10:44:43 -05:00
bnx2x_link.h bnx2x: ETS changes 2011-11-28 19:02:22 -05:00
bnx2x_main.c bnx2x: fix memory leak in bnx2x_init_firmware() 2012-03-16 01:57:26 -07:00
bnx2x_reg.h bnx2x: Fix PFC setting on BCM57840 2012-01-17 10:44:43 -05:00
bnx2x_sp.c bnx2x: added cpu_to_le16 when preparing ramrod's data 2012-03-12 17:01:25 -07:00
bnx2x_sp.h bnx2x: credit-leakage fixup on vlan_mac_del_all 2012-01-23 13:58:18 -05:00
bnx2x_stats.c bnx2x: pfc statistics counts pfc events twice 2012-03-12 17:01:25 -07:00
bnx2x_stats.h bnx2x: add PFC statistics 2011-12-06 13:06:04 -05:00
Makefile