webrtc: Fix memory leak in icestream
authorLudvig Rappe <ludvigr@axis.com>
Thu, 28 Apr 2022 15:08:11 +0000 (17:08 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 29 Apr 2022 21:52:43 +0000 (21:52 +0000)
commit26263c194e8a5cda608e40319ae58501baeda19f
tree571766622c1477969c17d4d8a49d3b8cd14fc1de
parent9cd6f9d51e316adde09849931fed3b23600c659f
webrtc: Fix memory leak in icestream

Since both g_value_set_object() and g_weak_ref_get() takes a reference
there will be two new references to the GstWebRTCICE object when there
should be only one. g_value_take_object() has the same functionality as
g_value_set_object() but does not take a reference.

Without this change, the GstWebRTCICE object will be leaked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2333>
subprojects/gst-plugins-bad/ext/webrtc/icestream.c