diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-04 17:55:10 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-08-04 17:55:10 +0300 |
commit | b1578e27b62e7332111bb706f79858b0866029e3 (patch) | |
tree | 781d6cd90a0bdfe2b6ed164767316292d146e600 /src/pulsecore/protocol-dbus.c | |
parent | 8966c61d3343e13502cfa210bb7123b7d7e7b27e (diff) |
dbus-protocol, dbusiface-core: Take a reference when storing the core pointer.
Diffstat (limited to 'src/pulsecore/protocol-dbus.c')
-rw-r--r-- | src/pulsecore/protocol-dbus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-dbus.c b/src/pulsecore/protocol-dbus.c index 475b952f..8fc08032 100644 --- a/src/pulsecore/protocol-dbus.c +++ b/src/pulsecore/protocol-dbus.c @@ -117,7 +117,7 @@ static pa_dbus_protocol *dbus_protocol_new(pa_core *c) { p = pa_xnew(pa_dbus_protocol, 1); PA_REFCNT_INIT(p); - p->core = c; + p->core = pa_core_ref(c); p->objects = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func); p->connections = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); p->extensions = pa_idxset_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func); @@ -170,6 +170,8 @@ void pa_dbus_protocol_unref(pa_dbus_protocol *p) { pa_assert_se(pa_shared_remove(p->core, "dbus-protocol") >= 0); + pa_core_unref(p->core); + pa_xfree(p); } |