diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2007-07-23 10:39:10 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2007-07-23 10:39:10 +0000 |
commit | 163242c6447bb011cfb14667c35a9e1f45b56a48 (patch) | |
tree | 3dddfdd562be7c6b1d1429699bd31bcd865fafbb /gst/gstpluginfeature.c | |
parent | 2a97e6f23e61a25215552b50d44ec545db5e363a (diff) |
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.
Diffstat (limited to 'gst/gstpluginfeature.c')
-rw-r--r-- | gst/gstpluginfeature.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c index 4430874936..66fdbf19b1 100644 --- a/gst/gstpluginfeature.c +++ b/gst/gstpluginfeature.c @@ -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); } /** |