Fix a memory leak in handling of tar files.