[gtk+/gtk-2-24] 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+/gtk-2-24] recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
- Date: Mon, 14 Nov 2016 19:27:48 +0000 (UTC)
commit 35871edb318083b2d7e4758cbdaad6109eed60ca
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 76b4b03..609ee1f 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -1608,7 +1608,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]