Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-10-06 08:11:16 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-10-06 08:11:16 (GMT)
commitc48b3da8b6c6f2205cff389f87c32299bdc8349a (patch)
tree23e96358703859856a7045f04b9251fd127cd396 /shell/ev-view.c
parent2fee7e257ca76d35608c884d52eb346b187fe618 (diff)
Fix memory leak. Fixes bug #555134.
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
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 1685aee..d0acbae 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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)