]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
Call pa_context_disconnect() explicitly
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Aug 2008 21:34:01 +0000 (23:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Sep 2008 18:25:35 +0000 (20:25 +0200)
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

index 53a25bdae3553280f3d378e46f7c656a26117292..e738d0727837662b5dee8b22153f2e4067d48909 100644 (file)
@@ -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);