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/modules/dbus/iface-core.c | |
parent | 8966c61d3343e13502cfa210bb7123b7d7e7b27e (diff) |
dbus-protocol, dbusiface-core: Take a reference when storing the core pointer.
Diffstat (limited to 'src/modules/dbus/iface-core.c')
-rw-r--r-- | src/modules/dbus/iface-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/dbus/iface-core.c b/src/modules/dbus/iface-core.c index 695e4a3c..ca9ba582 100644 --- a/src/modules/dbus/iface-core.c +++ b/src/modules/dbus/iface-core.c @@ -1923,7 +1923,7 @@ pa_dbusiface_core *pa_dbusiface_core_new(pa_core *core) { pa_assert(core); c = pa_xnew(pa_dbusiface_core, 1); - c->core = core; + c->core = pa_core_ref(core); c->subscription = pa_subscription_new(core, PA_SUBSCRIPTION_MASK_ALL, subscription_cb, c); c->dbus_protocol = pa_dbus_protocol_get(core); c->cards = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); @@ -2044,6 +2044,7 @@ void pa_dbusiface_core_free(pa_dbusiface_core *c) { pa_hook_slot_free(c->extension_unregistered_slot); pa_dbus_protocol_unref(c->dbus_protocol); + pa_core_unref(c->core); pa_xfree(c); } |