Skip to content

gs-app: Return a reference from gs_app_dup_content_rating()

Rename gs_app_get_content_rating() to gs_app_dup_content_rating(), access the GsApp’s private data under lock, and atomically return a strong reference to the content rating data.

This should avoid a race where the content rating data is returned by get_content_rating(), and then replaced with new data (from a worker thread) while the calling code is using it, resulting in use-after-free problems.

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

Fixes: #1467 (closed)

Closes #1467 (closed)

Merge request reports

Loading