net/ice/base: cleanup filter list on error
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 2 Mar 2021 07:23:57 +0000 (15:23 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 5 Mar 2021 08:36:38 +0000 (09:36 +0100)
commit34ede45188c318e451ef98183814cc4555208f46
treef2ebf7ead17bc510b0b77ec9392cb3a25b088a75
parent739dee1f22d9d2d537fe5d38bb90ba29606e0196
net/ice/base: cleanup filter list on error

When ice_remove_vsi_lkup_fltr is called, by calling
ice_add_to_vsi_fltr_list local copy of vsi filter list
is created. If any issues during creation of vsi filter
list occurs it up for the caller to free already
allocated memory. This patch ensures proper memory
deallocation in these cases.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Cc: stable@dpdk.org
Signed-off-by: Robert Malz <robertx.malz@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_switch.c