diff options
author | Matthew Waters <matthew@centricular.com> | 2020-08-24 17:01:22 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2020-08-24 17:02:35 +1000 |
commit | 7489addc0acdd5c1781f7729048bddc02832ded0 (patch) | |
tree | 5050bc6dc992dec6ff606c8a10a714b4cd008f1a /ext | |
parent | e4b848e2a8d3384e86e6717d5ac13eaf0d3551f1 (diff) | |
download | gstreamer-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.c | 2 |
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); |