From 85b44771a3104aba29a5ef45fdea2f21a1d474b2 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 15 Mar 2014 09:16:45 +0200 Subject: [PATCH 1/2] zeroconf-publish: Add locking around pa_mainloop_api_once() Commit e1e154c7377779377fa1a36655a10effd693f7b5 added locking around pa_mainloop_api_once() everywhere except pa__done(). This fixes that omission. --- src/modules/module-zeroconf-publish.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c index 0110e1d..35277c2 100644 --- a/src/modules/module-zeroconf-publish.c +++ b/src/modules/module-zeroconf-publish.c @@ -807,7 +807,9 @@ void pa__done(pa_module*m) { if (!(u = m->userdata)) return; + pa_threaded_mainloop_lock(u->mainloop); pa_mainloop_api_once(u->api, client_free, u); + pa_threaded_mainloop_unlock(u->mainloop); pa_asyncmsgq_wait_for(u->thread_mq.outq, AVAHI_MESSAGE_SHUTDOWN_COMPLETE); pa_threaded_mainloop_stop(u->mainloop); -- 1.8.3.1