Skip to content

user-manager: Don't prematurely free duplicate ActUser objects

Ray Strode requested to merge handle-two-in-flight-get_user-calls-better into main

If act_user_manager_get_user_by_id is called twice in a row quickly for the same user, two ActUser objects get generated, each ultimately representing the same user.

The second one to load gets freed because it's a duplicate. Freeing it is problematic though, because there still may be callers relying on it.

This commit changes the code to track the object as a "doppleganger" instead of freeing it.

Merge request reports