> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of 
> ZhaoJinming
> Sent: 29 May 2026 11:08
> To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw 
> <[email protected]>; Andrew Lunn <[email protected]>; David S 
> . Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub 
> Kicinski <[email protected]>; Paolo Abeni <[email protected]>
> Cc: [email protected]; [email protected]; 
> [email protected]; ZhaoJinming <[email protected]>
> Subject: [Intel-wired-lan] [PATCH net v2 2/2] ice: dpll: fix memory leak in 
> ice_dpll_init_info error paths
>
> Several error return paths in ice_dpll_init_info() directly return without 
> freeing previously allocated resources, causing memory leaks:
>
> - When de->input_prio allocation fails, d->inputs is leaked
> - When dp->input_prio allocation fails, d->inputs and de->input_prio
>  are leaked
> - When ice_get_cgu_rclk_pin_info() fails, all previously allocated
>  inputs/outputs/input_prio are leaked
> - When ice_dpll_init_pins_info(RCLK_INPUT) fails, same resources
>  are leaked
>
> Fix this by jumping to the deinit_info label which properly calls
> ice_dpll_deinit_info() to free all allocated resources.
>
> Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu")
> Signed-off-by: ZhaoJinming <[email protected]>
> ---
> drivers/net/ethernet/intel/ice/ice_dpll.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>

Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)

Reply via email to