Don't call munmap of hugepage memory twice in the error path. Coverity issue: 325730 Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- lib/librte_eal/linuxapp/eal/eal_memory.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index c1b5e079117a..48b23ce19ad3 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -1617,6 +1617,7 @@ eal_legacy_hugepage_init(void) tmp_hp = NULL; munmap(hugepage, nr_hugefiles * sizeof(struct hugepage_file)); + hugepage = NULL; /* we're not going to allocate more pages, so release VA space for * unused memseg lists -- 2.17.1