gstregistry: Don't leak feature name

This commit is contained in:
Edward Hervey 2011-10-17 09:27:26 +02:00
parent 2c64c53cd2
commit 631bf1f3af

View file

@ -277,8 +277,11 @@ gst_registry_finalize (GObject * object)
GstPluginFeature *feature = f->data; GstPluginFeature *feature = f->data;
if (feature) { if (feature) {
GST_LOG_OBJECT (registry, "removing feature %p (%s)", #ifndef GST_DISABLE_GST_DEBUG
feature, gst_plugin_feature_get_name (feature)); gchar *name = gst_plugin_feature_get_name (feature);
GST_LOG_OBJECT (registry, "removing feature %p (%s)", feature, name);
g_free (name);
#endif
gst_object_unparent (GST_OBJECT_CAST (feature)); gst_object_unparent (GST_OBJECT_CAST (feature));
} }
f = g_list_next (f); f = g_list_next (f);