hls: Remove invalid free

data does not have to be freed at all here, it's a pointer to
an arbitrary position inside the current line. Also don't reuse
the data variable for anything else, that will cause crashes
in playlists that have the I-frame playlist URI followed by
other attributes.

CID 1212127
This commit is contained in:
Sebastian Dröge 2014-05-09 15:26:31 +02:00
parent 2b92709154
commit 951bb53057

View file

@ -427,12 +427,12 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
if (uri[0] == '"')
uri += 1;
data = uri_join (self->uri, uri);
uri = uri_join (self->uri, uri);
g_free (urip);
if (data == NULL)
if (uri == NULL)
continue;
gst_m3u8_set_uri (new_list, data);
gst_m3u8_set_uri (new_list, uri);
}
}
@ -441,7 +441,6 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
(GCompareFunc) _m3u8_compare_uri)) {
GST_DEBUG ("Already have a list with this URI");
gst_m3u8_free (new_list);
g_free (data);
} else {
self->iframe_lists = g_list_append (self->iframe_lists, new_list);
}