purple: fix double unref of relay info array
commit70e2c429bb54c9606d99fc369f79de140ec70cd7
authorJakub Adam <jakub.adam@ktknet.cz>
Sat, 21 Jul 2018 23:58:46 +0000 (22 01:58 +0200)
committerStefan Becker <chemobejk@gmail.com>
Mon, 20 Aug 2018 09:48:20 +0000 (20 12:48 +0300)
tree81e3b6f33b8e6621c513653defd4ae4bb12100f6
parent7da459ab7c9589e7cb1aed515250678ca355f153
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.

(cherry picked from commit d85ec555956c0314e74f3b9d0389ab7fdc4fd8e0)
src/purple/purple-media.c