From: Michal Schmidt Date: Thu, 15 Mar 2012 14:08:29 +0000 (+0000) Subject: bnx2x: fix memory leak in bnx2x_init_firmware() X-Git-Tag: v3.3~2^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0ea452e422a1fc78ec8c639df64012d0b8dbb4a;p=pandora-kernel.git 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 Acked-by: Eilon Greenstein Signed-off-by: David S. Miller --- Reading git-diff-tree failed