ice: Fix resource leak in ice_remove_rule_internal()
authorJeb Cramer <jeb.j.cramer@intel.com>
Fri, 2 Aug 2019 08:25:26 +0000 (01:25 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 3 Sep 2019 23:08:54 +0000 (16:08 -0700)
commit8132e17dfb1683f1ef7ebf6fa8b61c1f48152660
treecbecb318cb240147d11a6689e03083b03a8d0557
parent03af840650bb4a1cfa95ea93493d04b679ab5f5c
ice: Fix resource leak in ice_remove_rule_internal()

We don't free s_rule if ice_aq_sw_rules() returns a non-zero status.  If
it returned a zero status, s_rule would be freed right after, so this
implies it should be freed within the scope of the function regardless.

Signed-off-by: Jeb Cramer <jeb.j.cramer@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_switch.c