sink-input, source-output: set sink/source to NULL before the "unlink post" hook
authorTanu Kaskinen <tanuk@iki.fi>
Wed, 12 Oct 2016 14:20:41 +0000 (17:20 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 19 Dec 2016 23:30:59 +0000 (01:30 +0200)
commit74ff1153425c927e6dfd198cbf1e0d6edfbfa873
tree022b48bc3ef265d688ab8ff6ce1e5b203b4fd140
parentc3393d27a5b18bca3e052d54a734d5cfb9e0aea0
sink-input, source-output: set sink/source to NULL before the "unlink post" hook

At the time the "unlink post" hook is fired, the stream is not any more
connected to its old device, so it makes sense to reset the sink/source
pointer to NULL before firing the hook. If this is not done, the pointer
may become stale during the "unlink post" hook, because
module-bluetooth-policy does a card profile change in its "unlink post"
callback, so even if the pointer is valid when module-bluetooth-policy's
callback is called, it will be invalid in subsequent callbacks.
src/pulsecore/sink-input.c
src/pulsecore/source-output.c