diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-05-10 11:49:45 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-05-10 11:49:45 -0400 |
commit | 00e4d0b7ab53f36ec1608f5ccd52130c91ee5fa7 (patch) | |
tree | 0b320f652520b3ae46329f180331d940f45b4704 | |
parent | b219b6e2a315b082fe156974e7b4bf6ec7a061c7 (diff) | |
download | mirror-ponymix-00e4d0b7ab53f36ec1608f5ccd52130c91ee5fa7.tar.gz mirror-ponymix-00e4d0b7ab53f36ec1608f5ccd52130c91ee5fa7.tar.bz2 mirror-ponymix-00e4d0b7ab53f36ec1608f5ccd52130c91ee5fa7.zip |
free full list of sinks on deinit
-rw-r--r-- | pulsemix.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -242,9 +242,16 @@ static void set_default_sink(struct pulseaudio_t *pulse, const char *sinkname) static void pulse_deinit(struct pulseaudio_t *pulse) { + struct sink_t *sink = pulse->sinks; + pa_context_disconnect(pulse->cxt); pa_mainloop_free(pulse->mainloop); - free(pulse->sinks); + + while (sink) { + sink = pulse->sinks->next_sink; + free(pulse->sinks); + pulse->sinks = sink; + } } static void pulse_init(struct pulseaudio_t *pulse, const char *clientname) |