mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
rc_client keeps raw pointers to itself in the callback data of award, leaderboard submit and ping requests, so destroying it with one in flight (disabling achievements mid-game) had the late callback write to freed memory. Count requests per client, retire a busy client instead of destroying it, and destroy it when its last request completes. Request timeouts in naett are per operation and the plain HTTP client has none for the body, so a retired client is also destroyed after 60 seconds regardless. Its late callbacks are then dropped, leaking their data. Clients are tracked by ID so a new client at a reused address can't get an old one's callbacks. At app exit, pending requests are cancelled without callbacks, so everything is destroyed immediately. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>