From: Carlos Garcia Campos Date: Sun, 11 Feb 2007 17:06:41 +0000 (+0000) Subject: Fix invalid free in ev-page-cache. Fixes bug #404745. X-Git-Tag: EVINCE_0_7_2~8 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=aa9dd5bfb5ea0ca5d0a0e5be577f2e028d0549ee;p=evince.git Fix invalid free in ev-page-cache. Fixes bug #404745. 2007-02-11 Carlos Garcia Campos * shell/ev-page-cache.c: (ev_page_cache_finalize): Fix invalid free in ev-page-cache. Fixes bug #404745. svn path=/trunk/; revision=2313 --- diff --git a/ChangeLog b/ChangeLog index 367d9f7a..3ed2f7bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-11 Carlos Garcia Campos + + * 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 * test/Makefile.am: diff --git a/shell/ev-page-cache.c b/shell/ev-page-cache.c index 01164520..ebf0de7f 100644 --- a/shell/ev-page-cache.c +++ b/shell/ev-page-cache.c @@ -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; }