summaryrefslogtreecommitdiff
path: root/girepository/girepository.c
diff options
context:
space:
mode:
authorPavel Holejsovsky <pavel.holejsovsky@gmail.com>2010-09-25 07:12:07 +0200
committerJohan Dahlin <johan@gnome.org>2010-09-25 11:32:28 -0300
commitf5e93c0aaca0d075b3a4263d49635d02fe7681de (patch)
treef61c1dc2cb53ef8317db20271ce4cd30c780f016 /girepository/girepository.c
parent7309e1f48c936a4e344f86ce0b73d3a3b68cb853 (diff)
downloadgobject-introspection-f5e93c0aaca0d075b3a4263d49635d02fe7681de.tar.gz
Fix memory leak.
Diffstat (limited to 'girepository/girepository.c')
-rw-r--r--girepository/girepository.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/girepository/girepository.c b/girepository/girepository.c
index 7a768a9a..712118dc 100644
--- a/girepository/girepository.c
+++ b/girepository/girepository.c
@@ -1094,13 +1094,19 @@ enumerate_namespace_versions (const gchar *namespace,
last_dash = strrchr (entry, '-');
version = g_strndup (last_dash+1, name_end-(last_dash+1));
if (!parse_version (version, &major, &minor))
- continue;
+ {
+ g_free (version);
+ continue;
+ }
}
else
continue;
if (g_hash_table_lookup (found_versions, version) != NULL)
- continue;
+ {
+ g_free (version);
+ continue;
+ }
g_hash_table_insert (found_versions, version, version);
path = g_build_filename (dirname, entry, NULL);