Fixed a little memory leak in unmap logic.