Fix two calendar-related memory leaks