summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2020-08-24 17:01:22 +1000
committerMatthew Waters <matthew@centricular.com>2020-08-24 17:02:35 +1000
commit7489addc0acdd5c1781f7729048bddc02832ded0 (patch)
tree5050bc6dc992dec6ff606c8a10a714b4cd008f1a /ext
parente4b848e2a8d3384e86e6717d5ac13eaf0d3551f1 (diff)
downloadgstreamer-plugins-bad-7489addc0acdd5c1781f7729048bddc02832ded0.tar.gz
webrtc/datachannel: free previous protocol/label fields
Fixes a memory leak Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1535>
Diffstat (limited to 'ext')
-rw-r--r--ext/webrtc/webrtcdatachannel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/webrtc/webrtcdatachannel.c b/ext/webrtc/webrtcdatachannel.c
index eccb0db16..430570725 100644
--- a/ext/webrtc/webrtcdatachannel.c
+++ b/ext/webrtc/webrtcdatachannel.c
@@ -416,7 +416,9 @@ _parse_control_packet (WebRTCDataChannel * channel, guint8 * data,
memcpy (proto, src, proto_len);
proto[proto_len] = '\0';
+ g_free (channel->parent.label);
channel->parent.label = label;
+ g_free (channel->parent.protocol);
channel->parent.protocol = proto;
channel->parent.priority = priority_uint_to_type (priority);
channel->parent.ordered = !(reliability & 0x80);