mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Fix minor memory leak.
2008-11-12 Tommi Komulainen <tommi.komulainen@iki.fi> * girepository/girepository.c (find_namespace_latest): Fix minor memory leak. svn path=/trunk/; revision=899
This commit is contained in:
parent
afe696cafd
commit
092901f3ab
@ -1015,12 +1015,13 @@ find_namespace_latest (const gchar *namespace,
|
||||
candidates = g_slist_sort (candidates, (GCompareFunc) compare_candidate_reverse);
|
||||
|
||||
elected = (struct NamespaceVersionCandidadate *) candidates->data;
|
||||
/* Remove the elected one so we don't try to free it */
|
||||
/* Remove the elected one so we don't try to free its contents */
|
||||
candidates = g_slist_delete_link (candidates, candidates);
|
||||
|
||||
result = elected->mfile;
|
||||
*path_ret = elected->path;
|
||||
*version_ret = elected->version;
|
||||
g_free (elected); /* just free the container */
|
||||
g_slist_foreach (candidates, (GFunc) free_candidate, NULL);
|
||||
g_slist_free (candidates);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user