Please sign in to comment.
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 <firstname.lastname@example.org> Acked-by: Eilon Greenstein <email@example.com> Signed-off-by: David S. Miller <firstname.lastname@example.org>
- Loading branch information...
Showing with 24 additions and 26 deletions.