webrtc: patch leak caused by early return
authorAlbert Sjölund <alberts@axis.com>
Thu, 16 Mar 2023 12:25:39 +0000 (13:25 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 17 Mar 2023 12:32:23 +0000 (12:32 +0000)
commit6341817018206e8aa27739f32a80aafec50d037b
tree92473b241aa729b84aaeceb173d90f4c4225d015
parent87e3df6a38888b8cc6ba34e6b78c404daaa76005
webrtc: patch leak caused by early return

In webrtc_data_channel_send functions, both data and string,
an early return on a non-open datachannel caused it to leak
the buffer used for pushing to appsrc, meaning any buffer
sent after leaving the open state was leaked in full.

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