mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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:
parent
2a97e6f23e
commit
163242c644
2 changed files with 8 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue