mpegtsmux: free pad_data->language before g_strdup in order to avoid memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=765005
This commit is contained in:
Damian Ziobro 2016-04-13 18:12:25 +01:00 committed by Sebastian Dröge
parent 4ad32506c6
commit 6141cd2f4b

View file

@ -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 {