Fix memory management in OAuth2Client