]> code.delx.au - pulseaudio/commit
zeroconf-publish: Don't react to messages while shutting down
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sat, 15 Mar 2014 07:37:06 +0000 (09:37 +0200)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Mon, 24 Mar 2014 07:28:43 +0000 (09:28 +0200)
commit37e73e10be9e42544a4cc160ff85ccada2cc9aa9
treea04eb673f2be316798c9bbf80e7c7db144176179
parentd03ffdccdb7286021e53876ba5d4adf9a1edd0d0
zeroconf-publish: Don't react to messages while shutting down

This fixes a case where pa__done() is called while
AVAHI_MESSAGE_PUBLISH_ALL is waiting for processing. The
pa_asyncmsgq_wait_for(AVAHI_MESSAGE_SHUTDOWN_COMPLETE) call will
process all pending messages, and processing AVAHI_MESSAGE_PUBLISH_ALL
causes publish_all_services(), and that in turn accesses u->services,
which has been already freed at this point. If we are shutting down,
we shouldn't react to any of the messages that the Avahi thread is
sending to the main thread.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=76184
src/modules/module-zeroconf-publish.c