mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:46:13 +00:00
webrtc/datachannel: clear the error after use
Fixes a memory leak Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1535>
This commit is contained in:
parent
7489addc0a
commit
e15a8fcbdd
1 changed files with 3 additions and 1 deletions
|
@ -285,8 +285,10 @@ _transport_closed (WebRTCDataChannel * channel)
|
||||||
channel->stored_error = NULL;
|
channel->stored_error = NULL;
|
||||||
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
||||||
|
|
||||||
if (error)
|
if (error) {
|
||||||
gst_webrtc_data_channel_on_error (GST_WEBRTC_DATA_CHANNEL (channel), error);
|
gst_webrtc_data_channel_on_error (GST_WEBRTC_DATA_CHANNEL (channel), error);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
gst_webrtc_data_channel_on_close (GST_WEBRTC_DATA_CHANNEL (channel));
|
gst_webrtc_data_channel_on_close (GST_WEBRTC_DATA_CHANNEL (channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue