Correct munmap bug that could try to release memory that's not reserved

Per the Linux documentation, this should not cause an error so check for
it and avoid trying