summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/client.c')
-rw-r--r--src/pulsecore/client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/client.c b/src/pulsecore/client.c
index 445e8768..1e65fcd9 100644
--- a/src/pulsecore/client.c
+++ b/src/pulsecore/client.c
@@ -67,6 +67,9 @@ pa_client *pa_client_new(pa_core *core, pa_client_new_data *data) {
c->driver = pa_xstrdup(data->driver);
c->module = data->module;
+ c->sink_inputs = pa_idxset_new(NULL, NULL);
+ c->source_outputs = pa_idxset_new(NULL, NULL);
+
c->userdata = NULL;
c->kill = NULL;
@@ -97,6 +100,11 @@ void pa_client_free(pa_client *c) {
pa_log_info("Freed %u \"%s\"", c->index, pa_strnull(pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME)));
pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
+ pa_assert(pa_idxset_isempty(c->sink_inputs));
+ pa_idxset_free(c->sink_inputs, NULL, NULL);
+ pa_assert(pa_idxset_isempty(c->source_outputs));
+ pa_idxset_free(c->source_outputs, NULL, NULL);
+
pa_proplist_free(c->proplist);
pa_xfree(c->driver);
pa_xfree(c);