Answer is: Energy is released to the environment.
Energy is released because fluid from higher temperature (energy) changes to fluid with lower temperature (energy).
The density (d =m/V) of the fluid increases, because volume of the fluid decreases.
The mass of the fluid is the same after the cooling.