Free old entries before assigning new ones.