Skip to content
  • Dan Winship's avatar
    gdbus: fix race condition in connection filter freeing · 7da3922d
    Dan Winship authored
    If you called g_dbus_connection_remove_filter() on a filter while it
    was running (or about to be run) in another thread, its GDestroyNotify
    would be run immediately, potentially causing the filter thread to
    crash.
    
    Fix this by refcounting the filters, and using the existing mechanism
    for running a GDestroyNotify in another thread in the case where the
    the gdbus thread is the one that frees it.
    
    Also, add a bit of documentation explaining this (and add a related
    clarification to g_dbus_connection_signal_subscribe()).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704568
    7da3922d