[gtk+] recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
- Date: Mon, 14 Nov 2016 19:26:43 +0000 (UTC)
commit 8b75268d1ce144c99066cdcbc50a34ade31e33d1
Author: Lauri Kasanen <curaga operamail com>
Date: Fri Nov 11 11:36:20 2016 +0200
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
gtk/gtkrecentmanager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index fe5f03f..f2dd510 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -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++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]