]> code.delx.au - pulseaudio/commitdiff
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)
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

No differences found