summaryrefslogtreecommitdiffstats
path: root/src/sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-06-11 21:30:16 +0000
committerLennart Poettering <lennart@poettering.net>2004-06-11 21:30:16 +0000
commit7dfeb1fc745757f1c2b7bf43bae80cf0f49fc9a6 (patch)
tree2876784e67ed6cf3974e7b06771835a8a4162979 /src/sink.c
parentaae40dcea260296d7d02d185b42f9275f34cb238 (diff)
make the whole stuff run and clean it self up again
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@8 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/sink.c')
-rw-r--r--src/sink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sink.c b/src/sink.c
index ac387c78..0e68cf8b 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -29,6 +29,8 @@ struct sink* sink_new(struct core *core, const char *name, const struct sample_s
}
s->monitor_source = source_new(core, n, spec);
+ free(n);
+
s->volume = 0xFF;
s->notify_callback = NULL;
@@ -41,12 +43,13 @@ void sink_free(struct sink *s) {
struct input_stream *i;
assert(s);
- idxset_remove_by_data(s->core->sinks, s, NULL);
- source_free(s->monitor_source);
-
while ((i = idxset_rrobin(s->input_streams, NULL)))
input_stream_free(i);
+ idxset_free(s->input_streams, NULL, NULL);
+ idxset_remove_by_data(s->core->sinks, s, NULL);
+ source_free(s->monitor_source);
+
free(s->name);
free(s);
}