diff options
author | Damian Ziobro <damian@xmementoit.com> | 2016-04-13 18:12:25 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-04-14 09:38:44 +0300 |
commit | 6141cd2f4b2f3ed91b206e5430c0acf666bb800b (patch) | |
tree | 89dc7fe9f3c335e90cf4968636bc6c1bb5604ada /gst/mpegtsmux | |
parent | 4ad32506c60a5e1891235b3c20a91d4654c32233 (diff) |
mpegtsmux: free pad_data->language before g_strdup in order to avoid memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=765005
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r-- | gst/mpegtsmux/mpegtsmux.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 649b7b68c..1ddf9f91f 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -933,6 +933,10 @@ mpegtsmux_sink_event (GstCollectPads * pads, GstCollectData * data, lang_code = gst_tag_get_language_code_iso_639_2B (lang); if (lang_code) { + if (pad_data->language) { + g_free (pad_data->language); + pad_data->language = NULL; + } GST_DEBUG_OBJECT (pad, "Setting language to '%s'", lang_code); pad_data->language = g_strdup (lang_code); } else { |