]> www.fi.muni.cz Git - evince.git/commitdiff
Fix memory leak. Fixes bug #555134.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 6 Oct 2008 08:11:16 +0000 (08:11 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 6 Oct 2008 08:11:16 +0000 (08:11 +0000)
2008-10-06  Carlos Garcia Campos  <carlosgc@gnome.org>

* shell/ev-view.c: (merge_selection_region), (clear_selection):

Fix memory leak. Fixes bug #555134.

svn path=/trunk/; revision=3216

ChangeLog
shell/ev-view.c

index 6f7678dc2355932b2b5dfac2786c4585be8c2271..1ecf9c9423837eac66135071ba982a40815f71e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-06  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (merge_selection_region), (clear_selection):
+
+       Fix memory leak. Fixes bug #555134.
+       
 2008-10-04  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-pixbuf-cache.c: (copy_job_to_job_info):
index 1685aee823eb8c8070111dcda836083913ed187e..d0acbae2e79b28a4d5e2a9955c72755f1dad35a6 100644 (file)
@@ -5390,6 +5390,7 @@ merge_selection_region (EvView *view,
        /* Update the selection */
        old_list = ev_pixbuf_cache_get_selection_list (view->pixbuf_cache);
        g_list_foreach (view->selection_info.selections, (GFunc)selection_free, NULL);
+       g_list_free (view->selection_info.selections);
        view->selection_info.selections = new_list;
        ev_pixbuf_cache_set_selection_list (view->pixbuf_cache, new_list);
        g_object_notify (G_OBJECT (view), "has-selection");
@@ -5498,6 +5499,7 @@ merge_selection_region (EvView *view,
 
        /* Free the old list, now that we're done with it. */
        g_list_foreach (old_list, (GFunc) selection_free, NULL);
+       g_list_free (old_list);
 }
 
 static void
@@ -5529,6 +5531,7 @@ static void
 clear_selection (EvView *view)
 {
        g_list_foreach (view->selection_info.selections, (GFunc)selection_free, NULL);
+       g_list_free (view->selection_info.selections);
        view->selection_info.selections = NULL;
        view->selection_info.in_selection = FALSE;
        if (view->pixbuf_cache)