summaryrefslogtreecommitdiff
path: root/include/linux/i2c
diff options
context:
space:
mode:
authorZilin Guan <zilin@seu.edu.cn>2026-01-22 03:26:44 +0000
committerTony Nguyen <anthony.l.nguyen@intel.com>2026-03-03 13:06:04 -0800
commitfe868b499d16f55bbeea89992edb98043c9de416 (patch)
tree6a751457e054d0da74983f2b78f82c4686f5bdad /include/linux/i2c
parentfb4903b3354aed4a2301180cf991226f896c87ed (diff)
ice: Fix memory leak in ice_set_ringparam()
In ice_set_ringparam, tx_rings and xdp_rings are allocated before rx_rings. If the allocation of rx_rings fails, the code jumps to the done label leaking both tx_rings and xdp_rings. Furthermore, if the setup of an individual Rx ring fails during the loop, the code jumps to the free_tx label which releases tx_rings but leaks xdp_rings. Fix this by introducing a free_xdp label and updating the error paths to ensure both xdp_rings and tx_rings are properly freed if rx_rings allocation or setup fails. Compile tested only. Issue found using a prototype static analysis tool and code review. Fixes: fcea6f3da546 ("ice: Add stats and ethtool support") Fixes: efc2214b6047 ("ice: Add support for XDP") Signed-off-by: Zilin Guan <zilin@seu.edu.cn> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'include/linux/i2c')
0 files changed, 0 insertions, 0 deletions