[evince/gnome-3-12] ev-sidebar-thumbnails: Fix memory leak



commit 7e88cc96492682fe4289934753a10a21e09af83e
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Fri Jul 25 14:49:05 2014 +0200

    ev-sidebar-thumbnails: Fix memory leak
    
    Free the GList returned by gtk_icon_view_get_selected_items().

 shell/ev-sidebar-thumbnails.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 181e12b..409ee10 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -248,6 +248,11 @@ ev_sidebar_thumbnails_page_is_in_visible_range (EvSidebarThumbnails *sidebar,
                         return FALSE;
 
                 path = (GtkTreePath *)selection->data;
+
+                /* We don't handle or expect multiple selection. */
+                g_assert (selection->next == NULL);
+                g_list_free (selection);
+
                 if (!gtk_icon_view_get_visible_range (GTK_ICON_VIEW (sidebar->priv->icon_view), &start, 
&end)) {
                         gtk_tree_path_free (path);
                         return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]