[merge] fix mmap catch ebadf

Signed-off-by: David Goulet <dgoulet@efficios.com>