connection: dont leak sync replies
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 23 Oct 2014 12:15:14 +0000 (14:15 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 23 Oct 2014 12:15:14 +0000 (14:15 +0200)
commitd343b2e9286800708229ab7e918496a2d48a0a7f
tree4c60085dea7b879fb7fa3a5ffd69f16a8a2643fe
parent0f05bf6149f72ba6642558066feb671565bd392e
connection: dont leak sync replies

If a timeout occurs before we can queue a reply to a message, we might
queue it _after_ the sync caller already returned and dropped its ref.
Avoid this by using the 'waiting' flag to sync between sender and
receiver.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
connection.c