Init context variables to guard against invalid free.