mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
fix destruction of dbus modules: make sure we don't leave filter function registered after unreffing the dbus connection
This commit is contained in:
parent
23a3c55c51
commit
49f09d6d0e
3 changed files with 23 additions and 3 deletions
|
|
@ -341,8 +341,17 @@ void pa__done(pa_module *m) {
|
|||
pa_hashmap_free(u->sessions, NULL, NULL);
|
||||
}
|
||||
|
||||
if (u->connection)
|
||||
if (u->connection) {
|
||||
DBusError error;
|
||||
dbus_error_init(&error);
|
||||
|
||||
dbus_bus_remove_match(pa_dbus_connection_get(u->connection), "type='signal',sender='org.freedesktop.ConsoleKit', interface='org.freedesktop.ConsoleKit.Seat'", &error);
|
||||
dbus_error_free(&error);
|
||||
|
||||
dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u);
|
||||
|
||||
pa_dbus_connection_unref(u->connection);
|
||||
}
|
||||
|
||||
pa_xfree(u);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue