Free memory allocated by ::realpath.