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>
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
g_set_error (error, GST_WEBRTC_ERROR,
GST_WEBRTC_ERROR_INVALID_STATE, "channel is not open");
+ gst_buffer_unref (buffer);
return FALSE;
}
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
g_set_error (error, GST_WEBRTC_ERROR,
GST_WEBRTC_ERROR_INVALID_STATE, "channel is not open");
+ gst_buffer_unref (buffer);
return FALSE;
}
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);