purple: fix double unref of relay info array
commitd85ec555956c0314e74f3b9d0389ab7fdc4fd8e0
authorJakub Adam <jakub.adam@ktknet.cz>
Sat, 21 Jul 2018 23:58:46 +0000 (22 01:58 +0200)
committerJakub Adam <jakub.adam@ktknet.cz>
Sun, 22 Jul 2018 00:35:52 +0000 (22 02:35 +0200)
tree6b2e56a48f71dcfda5a1f98aa748f1bd9cd3361c
parentc9de617f16cdc6e59d168015a84c41c24395eed2
purple: fix double unref of relay info array

This code was a relic from back when media_relays used to be
a GValueArray. Assigning it to "relay-info" GParameter created a copy
of the whole array which had to be freed after use.

Farstream now uses GPtrArray, which is reference-counted and we should
unref it only once in sipe_backend_media_relays_free() in order to avoid
premature deallocation.

Fixes memory corruption and occasional crashes happening mostly after
remote application sharing has been closed.
src/purple/purple-media.c