From 7c1f52d2c510bd5cdf75f0acd15604f645ea5b41 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 21 Aug 2008 23:34:01 +0200 Subject: Call pa_context_disconnect() explicitly Make sure the pa_context is disconnected when we unref it. This is also done implicitly when the last reference to the pa_context is dropped, but that might be later then expected in case someone else took a reference on our object. To make sure that the pa_context will than not make any call into our code, disconnect it explicitly. --- pulse/pulse.c | 1 + 1 file changed, 1 insertion(+) (limited to 'pulse') diff --git a/pulse/pulse.c b/pulse/pulse.c index 53a25bd..e738d07 100644 --- a/pulse/pulse.c +++ b/pulse/pulse.c @@ -174,6 +174,7 @@ void pulse_free(snd_pulse_t * p) { pa_threaded_mainloop_stop(p->mainloop); + pa_context_disconnect(p->context); pa_context_unref(p->context); pa_threaded_mainloop_free(p->mainloop); -- cgit