gobject-introspection r500 - in trunk: . girepository



Author: walters
Date: Tue Aug 26 21:01:36 2008
New Revision: 500
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=500&view=rev

Log:
2008-08-26  Colin Walters  <walters verbum org>

	* girepository/gtypelib.c (_g_typelib_init): Free
	string in the right place.


Modified:
   trunk/ChangeLog
   trunk/girepository/gtypelib.c

Modified: trunk/girepository/gtypelib.c
==============================================================================
--- trunk/girepository/gtypelib.c	(original)
+++ trunk/girepository/gtypelib.c	Tue Aug 26 21:01:36 2008
@@ -1953,6 +1953,7 @@
 	  if (typelib->module == NULL)
 	    {
 	      shlib_full = g_string_new (shlib);
+
 	      /* Prefix with "lib", try both .la and .so */
 	      if (!g_str_has_prefix (shlib_full->str, "lib"))
 		g_string_prepend (shlib_full, "lib");
@@ -1961,11 +1962,12 @@
 	      if (typelib->module == NULL)
 		g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, "so");
 	      typelib->module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
+
+	      g_string_free (shlib_full, TRUE);
 	    }
 	  if (typelib->module == NULL)
             g_warning ("Failed to load shared library '%s' referenced by the typelib: %s",
                        shlib, g_module_error ());
-	  g_string_free (shlib_full, TRUE);
         }
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]