Free up allocated memory in routines that was missed before.