]> www.fi.muni.cz Git - evince.git/commitdiff
Fix invalid free in ev-page-cache. Fixes bug #404745.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 11 Feb 2007 17:06:41 +0000 (17:06 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 11 Feb 2007 17:06:41 +0000 (17:06 +0000)
2007-02-11  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-page-cache.c: (ev_page_cache_finalize):
Fix invalid free in ev-page-cache. Fixes bug #404745.

svn path=/trunk/; revision=2313

ChangeLog
shell/ev-page-cache.c

index 367d9f7ac2868c7512ff46ea9ceddb3b6f2d3198..3ed2f7bcff652b5d0cea7a6616ab91b339f712a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-11  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-page-cache.c: (ev_page_cache_finalize):
+
+       Fix invalid free in ev-page-cache. Fixes bug #404745.
+
 2007-02-11  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * test/Makefile.am:
index 0116452064eee2dcd2bc4ea12250385ecdb1f80c..ebf0de7f9b69f8d2409e51d69f75dabb0438d4aa 100644 (file)
@@ -129,7 +129,13 @@ ev_page_cache_finalize (GObject *object)
        }
 
        if (page_cache->page_labels) {
-               g_strfreev (page_cache->page_labels);
+               gint i;
+
+               for (i = 0; i < page_cache->n_pages; i++) {
+                       if (page_cache->page_labels[i])
+                               g_free (page_cache->page_labels[i]);
+               }
+               g_free (page_cache->page_labels);
                page_cache->page_labels = NULL;
        }