From: Lennart Poettering Date: Thu, 21 Aug 2008 21:34:01 +0000 (+0200) Subject: Call pa_context_disconnect() explicitly X-Git-Tag: v1.0.18rc3~22 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=7c1f52d2c510bd5cdf75f0acd15604f645ea5b41;p=alsa-plugins.git 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. --- 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);