]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Fix resource leak on early exit from function
authorEric Joyner <eric.joyner@intel.com>
Fri, 8 May 2020 00:41:07 +0000 (17:41 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 May 2020 05:10:04 +0000 (22:10 -0700)
commit5fe8f6cd3b75110696b4b058df1b792dd8bfd4f6
tree8687664d21bfdf0f0402fd2f7fe132053e9e1892
parentdd42049935d41c319d47caa4f511ea14dedc8020
ice: Fix resource leak on early exit from function

Memory allocated in the ice_add_prof_id_vsig() function wasn't being
properly freed if an error occurred inside the for-loop in the function.

In particular, 'p' wasn't being freed if an error occurred before it was
added to the resource list at the end of the for-loop.

Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_flex_pipe.c