Do not leak typelibs with wrong header info.

Previously the typelibs that were loaded but whose header information
weren't right were just leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=625672
This commit is contained in:
Steve Frécinaux 2010-08-03 23:39:58 +02:00
parent e3b7e76b86
commit 439753a5b3

View File

@ -1280,6 +1280,7 @@ require_internal (GIRepository *repository,
"Typelib file %s for namespace '%s' contains "
"namespace '%s' which doesn't match the file name",
path, namespace, typelib_namespace);
g_typelib_free (typelib);
goto out;
}
if (version != NULL && strcmp (typelib_version, version) != 0)
@ -1289,6 +1290,7 @@ require_internal (GIRepository *repository,
"Typelib file %s for namespace '%s' contains "
"version '%s' which doesn't match the expected version '%s'",
path, namespace, typelib_version, version);
g_typelib_free (typelib);
goto out;
}