diff options
author | Lennart Poettering <mznyfn@0pointer.de> | 2008-09-25 21:03:01 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-09-26 11:47:40 +0200 |
commit | 8b16b925f4ecb6d0cf0dd5b045eebe12d7f778f5 (patch) | |
tree | 2235c3c3fcf4515fda634df6c1076c288a237123 | |
parent | ae975f9c06e429da9dc8821367d775a25af69fbb (diff) |
pulse - Fix destruction logic on failed construction
We need to stop the main loop first, then free the context and finally
free the mainloop.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | pulse/pulse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pulse/pulse.c b/pulse/pulse.c index 022ca55..3940238 100644 --- a/pulse/pulse.c +++ b/pulse/pulse.c @@ -208,6 +208,12 @@ snd_pulse_t *pulse_new(void) fail: if (p->mainloop) + pa_threaded_mainloop_stop(p->mainloop); + + if (p->context) + pa_context_unref(p->context); + + if (p->mainloop) pa_threaded_mainloop_free(p->mainloop); if (p->main_fd >= 0) |