Skip to content

gs-app: Return a reference from gs_app_dup_addons()

Rename gs_app_get_addons() to gs_app_dup_addons(), access the GsApp’s private data under lock, and atomically return a strong reference to the list of addons.

This is one step to avoiding a race where the list of addons is modified by one thread while being read by another. The second step (which will happen in a following commit) is to change gs_app_add_addon() to guarantee that the GsAppList returned by gs_app_dup_addons() is immutable.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Helps: #1721 (closed)

Closes #1721 (closed)

Merge request reports