mem: fix resource leak on map failure
Coverity issue: 272601 Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
42c2a6a819
commit
5441fcfd87
@ -1750,6 +1750,7 @@ eal_legacy_hugepage_attach(void)
|
||||
if (map_addr == MAP_FAILED) {
|
||||
RTE_LOG(ERR, EAL, "Could not map %s: %s\n",
|
||||
hf->filepath, strerror(errno));
|
||||
close(fd);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user