From: Jan Schmidt Date: Wed, 7 Sep 2005 15:22:29 +0000 (+0000) Subject: gst/gstplugin.c: Call g_module_close when we don't load the module X-Git-Tag: RELEASE-0_9_3~185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5da128644348bc53af40916ab30fb6b3d340f05;p=platform%2Fupstream%2Fgstreamer.git gst/gstplugin.c: Call g_module_close when we don't load the module Original commit message from CVS: * gst/gstplugin.c: (gst_plugin_load_file): Call g_module_close when we don't load the module * gst/registries/gstlibxmlregistry.c: (gst_xml_registry_get_property): Port leak fix from 0.8 --- diff --git a/ChangeLog b/ChangeLog index 0f5687f..8696757 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-09-07 Jan Schmidt + + * gst/gstplugin.c: (gst_plugin_load_file): + Call g_module_close when we don't load the module + + * gst/registries/gstlibxmlregistry.c: + (gst_xml_registry_get_property): + Port leak fix from 0.8 + 2005-09-07 Stefan Kost * docs/gst/gstreamer-docs.sgml: diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 7e4958f..a18f1c7 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -414,9 +414,12 @@ gst_plugin_load_file (const gchar * filename, GError ** error) module = g_module_open (filename, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); - /* handle module == NULL case */ - if (!gst_plugin_check_module (module, filename, error, &ptr)) + /* gst_plugin_check_module handles module == NULL case */ + if (!gst_plugin_check_module (module, filename, error, &ptr)) { + if (module != NULL) + g_module_close (module); return NULL; + } desc = (GstPluginDesc *) ptr; diff --git a/gst/registries/gstlibxmlregistry.c b/gst/registries/gstlibxmlregistry.c index d99ef86..3f57f9d 100644 --- a/gst/registries/gstlibxmlregistry.c +++ b/gst/registries/gstlibxmlregistry.c @@ -241,7 +241,7 @@ gst_xml_registry_get_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_LOCATION: - g_value_set_string (value, g_strdup (registry->location)); + g_value_set_string (value, registry->location); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);