Corrosion of metals by molten salts in heat-treatment processes