mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
dbus: keep a ref to DBusConnection if reconnecting is not handled
Several places in the code don't handle reconnecting DBus connections yet. In those cases, a ref to the DBusConnection handle needs to be kept, so that there's no use-after-free if it gets freed by spa_dbus if the connection is broken. Adjust spa_dbus so that others keeping additional refs is safe.
This commit is contained in:
parent
cb6dbd165a
commit
2b515b5e50
6 changed files with 58 additions and 9 deletions
|
|
@ -68,6 +68,11 @@ struct spa_dbus_connection {
|
|||
/**
|
||||
* Get the DBusConnection from a wrapper
|
||||
*
|
||||
* Note that the returned handle is closed and unref'd by spa_dbus
|
||||
* immediately before emitting the asynchronous "disconnected" event.
|
||||
* The caller must either deal with the invalidation, or keep an extra
|
||||
* ref on the handle returned.
|
||||
*
|
||||
* \param conn the spa_dbus_connection wrapper
|
||||
* \return a pointer of type DBusConnection
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue