[PATCH 1/2] zeroconf-publish: Add locking around pa_mainloop_api_once()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux