telepathy: fix possible use-after-free
commitb9e175ad1bb19e8b7c33f506987f27ce7dca70dc
authorJakub Adam <jakub.adam@ktknet.cz>
Mon, 7 Nov 2016 10:26:50 +0000 (7 11:26 +0100)
committerJakub Adam <jakub.adam@ktknet.cz>
Mon, 7 Nov 2016 10:48:28 +0000 (7 11:48 +0100)
tree9676108ead1c6df4b6e281f18dbd9e7aa2e326b2
parentf9bd3869ead21613e3f77929f76c55d152393de9
telepathy: fix possible use-after-free

We shouldn't free the buffer passed to g_output_stream_write_async() right
away since the function makes no copy and the buffer must stay valid until
callback is called.

Reported as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843431
src/telepathy/telepathy-transport.c