Return value should be zero for success, but if unlock and unlink have succeeded, return value was 1, which triggered failure message in calling code.
Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime") Cc: anatoly.bura...@intel.com Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com> --- lib/librte_eal/linuxapp/eal/eal_memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c index c441c89..3282293 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c @@ -647,7 +647,7 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi, memset(ms, 0, sizeof(*ms)); - return ret; + return ret < 0 ? -1 : 0; } struct alloc_walk_param { -- 2.7.4