oauth2: Fixed a memory leak in an OOM condition