mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
Fix memory leak.
This commit is contained in:
parent
916798b704
commit
508edb91ad
@ -1094,13 +1094,19 @@ enumerate_namespace_versions (const gchar *namespace,
|
|||||||
last_dash = strrchr (entry, '-');
|
last_dash = strrchr (entry, '-');
|
||||||
version = g_strndup (last_dash+1, name_end-(last_dash+1));
|
version = g_strndup (last_dash+1, name_end-(last_dash+1));
|
||||||
if (!parse_version (version, &major, &minor))
|
if (!parse_version (version, &major, &minor))
|
||||||
|
{
|
||||||
|
g_free (version);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_hash_table_lookup (found_versions, version) != NULL)
|
if (g_hash_table_lookup (found_versions, version) != NULL)
|
||||||
|
{
|
||||||
|
g_free (version);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
g_hash_table_insert (found_versions, version, version);
|
g_hash_table_insert (found_versions, version, version);
|
||||||
|
|
||||||
path = g_build_filename (dirname, entry, NULL);
|
path = g_build_filename (dirname, entry, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user