gst/gstpluginfeature.c: Avoid double memory usage for pluginfeature names. Fixes #459466.

Original commit message from CVS:
* gst/gstpluginfeature.c: (gst_plugin_feature_finalize),
(gst_plugin_feature_set_name):
Avoid double memory usage for pluginfeature names. Fixes #459466.
This commit is contained in:
Stefan Kost 2007-07-23 10:39:10 +00:00
parent 2a97e6f23e
commit 163242c644
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2007-07-23 Stefan Kost <ensonic@users.sf.net>
* gst/gstpluginfeature.c: (gst_plugin_feature_finalize),
(gst_plugin_feature_set_name):
Avoid double memory usage for pluginfeature names. Fixes #459466.
2007-07-22 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstpad.h:

View file

@ -68,7 +68,6 @@ gst_plugin_feature_finalize (GObject * object)
GST_DEBUG ("finalizing feature %p: '%s'", feature,
GST_PLUGIN_FEATURE_NAME (feature));
g_free (feature->name);
g_free (feature->plugin_name);
G_OBJECT_CLASS (parent_class)->finalize (object);
@ -184,9 +183,9 @@ gst_plugin_feature_set_name (GstPluginFeature * feature, const gchar * name)
if (feature->name) {
g_return_if_fail (strcmp (feature->name, name) == 0);
} else {
feature->name = g_strdup (name);
gst_object_set_name (GST_OBJECT (feature), name);
feature->name = GST_OBJECT_NAME (GST_OBJECT (feature));
}
gst_object_set_name (GST_OBJECT (feature), feature->name);
}
/**