diff options
author | 2012-03-15 14:08:29 +0000 | |
---|---|---|
committer | 2012-03-16 01:57:26 -0700 | |
commit | c0ea452e422a1fc78ec8c639df64012d0b8dbb4a (patch) | |
tree | 372e3246e5f51cf490a760e1d49de60263d53d2e /net/unix/af_unix.c | |
parent | bnx2x: fix a crash on corrupt firmware file (diff) | |
download | wireguard-linux-c0ea452e422a1fc78ec8c639df64012d0b8dbb4a.tar.xz wireguard-linux-c0ea452e422a1fc78ec8c639df64012d0b8dbb4a.zip |
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 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions