mem: fix munmap in error unwind
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 22 Jan 2020 17:06:11 +0000 (09:06 -0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 6 Feb 2020 14:39:30 +0000 (15:39 +0100)
commit292f02b58c26c3bad2327a52c49ec6eff580e124
treeb4ebaa7903b0ac52e7e3552d72b3e6a58c2727cc
parent3b67a644629c3dd837b481e3d78db20101e14628
mem: fix munmap in error unwind

The loop to unwind existing mmaps was only unmapping the
first segment and the error paths after mmap() were not
doing munmap of the current segment.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linux/eal/eal_memory.c