diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-03-15 14:08:29 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-16 08:57:26 (GMT) |
commit | c0ea452e422a1fc78ec8c639df64012d0b8dbb4a (patch) | |
tree | 372e3246e5f51cf490a760e1d49de60263d53d2e /drivers/tty/cyclades.c | |
parent | 127d0a198a310970b31866af8bbb6d4b1068e546 (diff) | |
download | linux-c0ea452e422a1fc78ec8c639df64012d0b8dbb4a.tar.xz |
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>
Diffstat (limited to 'drivers/tty/cyclades.c')
0 files changed, 0 insertions, 0 deletions