diff --git a/subprojects/gstreamer/gst/gstregistrychunks.c b/subprojects/gstreamer/gst/gstregistrychunks.c index b8a8895895..24b01029a2 100644 --- a/subprojects/gstreamer/gst/gstregistrychunks.c +++ b/subprojects/gstreamer/gst/gstregistrychunks.c @@ -116,10 +116,7 @@ void _priv_gst_registry_chunk_free (GstRegistryChunk * chunk) { if (!(chunk->flags & GST_REGISTRY_CHUNK_FLAG_CONST)) { - if ((chunk->flags & GST_REGISTRY_CHUNK_FLAG_MALLOC)) - g_free (chunk->data); - else - g_free (chunk->data); + g_free (chunk->data); } g_free (chunk); } @@ -165,7 +162,7 @@ gst_registry_chunks_save_string (GList ** list, gchar * str) chunk = g_new (GstRegistryChunk, 1); chunk->data = str; chunk->size = strlen ((gchar *) chunk->data) + 1; - chunk->flags = GST_REGISTRY_CHUNK_FLAG_MALLOC; + chunk->flags = GST_REGISTRY_CHUNK_FLAG_NONE; chunk->align = FALSE; *list = g_list_prepend (*list, chunk); return TRUE; diff --git a/subprojects/gstreamer/gst/gstregistrychunks.h b/subprojects/gstreamer/gst/gstregistrychunks.h index 927f58037b..9121e5fd0c 100644 --- a/subprojects/gstreamer/gst/gstregistrychunks.h +++ b/subprojects/gstreamer/gst/gstregistrychunks.h @@ -28,13 +28,11 @@ /* * we reference strings directly from the plugins and in this case set CONST to - * avoid freeing them. If g_free() should be used, the MALLOC flag is set, - * otherwise g_free() will also be used. (FIXME: don't need MALLOC flag any more) + * avoid freeing them. */ enum { GST_REGISTRY_CHUNK_FLAG_NONE = 0, GST_REGISTRY_CHUNK_FLAG_CONST = 1, - GST_REGISTRY_CHUNK_FLAG_MALLOC = 2, }; /*