recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"

Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
This commit is contained in:
Lauri Kasanen 2016-11-11 11:36:20 +02:00 committed by Matthias Clasen
parent 34e26017e3
commit 8b75268d1c

View File

@ -1481,7 +1481,10 @@ gtk_recent_manager_clamp_to_size (GtkRecentManager *manager,
uris = g_bookmark_file_get_uris (priv->recent_items, &n_uris);
if (n_uris < size)
{
g_strfreev (uris);
return;
}
for (i = 0; i < n_uris - size; i++)
{