[evince] ev-sidebar-thumbnails: Fix memory leak



commit ae93d046845f2aac18aef3930de9036929631fc9
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 994a403..49045f3 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -251,6 +251,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]