]> www.fi.muni.cz Git - evince.git/commitdiff
Fix memory leak.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 28 Jan 2007 22:34:29 +0000 (22:34 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 28 Jan 2007 22:34:29 +0000 (22:34 +0000)
2007-01-29  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-window.c: (ev_window_add_history):
Fix memory leak.

svn path=/trunk/; revision=2270

ChangeLog
shell/ev-view.c
shell/ev-window.c

index 20cbebe9846555ce94c196964e6e57a67f0edf51..fe5b0a575d384d96ded04f95be559e9faa4627be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-29  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-window.c: (ev_window_add_history):
+
+       Fix memory leak. 
+
 2007-01-29  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * shell/ev-view.c: (ev_view_page_label_from_dest), (tip_from_link):
index 072ca0822336eb1439dbd257f5ea4c674bb6a244..15053d471a7eecbe3226cf1791c7855ae60511d3 100644 (file)
@@ -1348,7 +1348,6 @@ ev_view_handle_link (EvView *view, EvLink *link)
        if (!action)
                return;
 
-       
        type = ev_link_action_get_action_type (action);
 
        switch (type) {
index dc0340917321270a38e7f15d8d784d6123f16566..341907b7b57597bdb643562881ffdacab1c322fd 100644 (file)
@@ -680,10 +680,9 @@ ev_window_find_chapter (GtkTreeModel *tree_model,
 static void
 ev_window_add_history (EvWindow *window, gint page, EvLink *link)
 {
-       const gchar *page_label = NULL;
+       gchar *page_label = NULL;
        gchar *link_title;
        FindTask find_task;
-
        EvLink *real_link;
        EvLinkAction *action;
        EvLinkDest *dest;
@@ -692,7 +691,7 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
                action = g_object_ref (ev_link_get_action (link));
                dest = ev_link_action_get_dest (action);
                page = ev_link_dest_get_page (dest);
-               page_label = ev_view_page_label_from_dest (window->priv->view, dest);
+               page_label = ev_view_page_label_from_dest (EV_VIEW (window->priv->view), dest);
        } else {
                dest = ev_link_dest_new_page (page);
                action = ev_link_action_new_dest (dest);
@@ -712,7 +711,6 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
                g_object_get (G_OBJECT (window->priv->sidebar_links), "model", &model, NULL);
                
                if (model) {
-               
                        gtk_tree_model_foreach (model,
                                                ev_window_find_chapter,
                                                &find_task);
@@ -729,7 +727,8 @@ ev_window_add_history (EvWindow *window, gint page, EvLink *link)
        real_link = ev_link_new (link_title, action);
        
        ev_history_add_link (window->priv->history, real_link);
-       
+
+       g_free (find_task.chapter);
        g_free (link_title);
        g_free (page_label);
        g_object_unref (real_link);