bluetooth: Fix thread teardown code ordering
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 12 Feb 2013 19:37:02 +0000 (21:37 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 16 Feb 2013 18:48:55 +0000 (20:48 +0200)
commit77b3ba514cbb00adb89bafa7f48b4430d9764355
treec797bf1dbd3d19f4146d053c823eee91bd75a025
parent5d4b7c4a89652d70a924d1c6091398c5b2d84bd3
bluetooth: Fix thread teardown code ordering

thread_mq.outq may contain some unprocessed messages, which should be
dispatched before unreffing the sink and source. If the sink and
source are unreffed before all messages to them have been dispatched,
the unreffing won't free the sink and source, and that in turn will
likely cause problems with things getting freed in a wrong order.
src/modules/bluetooth/module-bluetooth-device.c