mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
dbus: Fix the order of freeing stuff when unloading module-dbus-protocol.
This commit is contained in:
parent
7055694023
commit
2f7eb35f37
1 changed files with 9 additions and 3 deletions
|
|
@ -592,14 +592,20 @@ void pa__done(pa_module *m) {
|
||||||
if (u->core_iface)
|
if (u->core_iface)
|
||||||
pa_dbusiface_core_free(u->core_iface);
|
pa_dbusiface_core_free(u->core_iface);
|
||||||
|
|
||||||
if (u->cleanup_event)
|
|
||||||
m->core->mainloop->defer_free(u->cleanup_event);
|
|
||||||
|
|
||||||
while ((c = pa_idxset_steal_first(u->connections, NULL)))
|
while ((c = pa_idxset_steal_first(u->connections, NULL)))
|
||||||
connection_free(c);
|
connection_free(c);
|
||||||
|
|
||||||
pa_idxset_free(u->connections, NULL, NULL);
|
pa_idxset_free(u->connections, NULL, NULL);
|
||||||
|
|
||||||
|
/* This must not be called before the connections are freed, because if
|
||||||
|
* there are any connections left, they will emit the
|
||||||
|
* org.freedesktop.DBus.Local.Disconnected signal, and
|
||||||
|
* disconnection_filter_cb() will be called. disconnection_filter_cb() then
|
||||||
|
* tries to enable the defer event, and if it's already freed, an assertion
|
||||||
|
* will be hit in mainloop.c. */
|
||||||
|
if (u->cleanup_event)
|
||||||
|
m->core->mainloop->defer_free(u->cleanup_event);
|
||||||
|
|
||||||
if (u->tcp_server)
|
if (u->tcp_server)
|
||||||
server_free(u->tcp_server);
|
server_free(u->tcp_server);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue