Segment index was calculated incorrectly, causing free_seg to
attempt to free segments that do not exist.
Fixes:
a5ff05d60fc5 ("mem: support unmapping pages at runtime")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
&cur_msl->memseg_arr;
tmp = rte_fbarray_get(arr, j);
- if (free_seg(tmp, wa->hi, msl_idx,
- start_idx + j)) {
+ if (free_seg(tmp, wa->hi, msl_idx, j)) {
RTE_LOG(ERR, EAL, "Cannot free page\n");
continue;
}