Need to free new ice_vsig_prof if no valid ptype can be found.
Fixes:
d935fb5bb091 ("net/ice/base: fix packet type size")
Cc: stable@dpdk.org
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
p->tcam[i].prof_id = map->prof_id;
p->tcam[i].tcam_idx = ICE_INVALID_TCAM;
- if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg))
+ if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg)) {
+ ice_free(hw, p);
return ICE_ERR_CFG;
+ }
p->tcam[i].ptg = ptg;
}