* [PATCH] alsa-plugins: Fix destruction logic on failed construction
@ 2008-09-25 19:03 Lennart Poettering
0 siblings, 0 replies; only message in thread
From: Lennart Poettering @ 2008-09-25 19:03 UTC (permalink / raw)
To: ALSA Development Mailing List
Heya!
We need to stop the main loop first, then free the context and finally
free the mainloop.
---
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)
--
1.6.0.1
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-25 19:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25 19:03 [PATCH] alsa-plugins: Fix destruction logic on failed construction Lennart Poettering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox