From 6b3613c2246624b0d9e0234096c95ad8daa20632 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sat, 27 Dec 2008 18:36:59 +0000 Subject: [PATCH] Fix memory leaks. 2008-12-24 Carlos Garcia Campos * shell/ev-window.c: (setup_size_from_metadata), (ev_window_load_print_settings_from_metadata): Fix memory leaks. svn path=/trunk/; revision=3305 --- ChangeLog | 7 +++++++ shell/ev-window.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 02f90be0..e2b6718c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-24 Carlos Garcia Campos + + * shell/ev-window.c: (setup_size_from_metadata), + (ev_window_load_print_settings_from_metadata): + + Fix memory leaks. + 2008-12-24 Carlos Garcia Campos * libdocument/ev-document.c: (ev_document_get_type): diff --git a/shell/ev-window.c b/shell/ev-window.c index 77474bff..e3c225c8 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -967,6 +967,7 @@ setup_size_from_metadata (EvWindow *window) if (ev_metadata_manager_get (uri, "window_maximized", &maximized, FALSE)) { if (g_value_get_boolean (&maximized)) { gtk_window_maximize (GTK_WINDOW (window)); + g_value_unset (&maximized); return; } else { gtk_window_unmaximize (GTK_WINDOW (window)); @@ -2325,6 +2326,8 @@ ev_window_load_print_settings_from_metadata (EvWindow *window) gtk_print_settings_set (window->priv->print_settings, document_print_settings[i], success ? g_value_get_string (&value) : NULL); + if (success) + g_value_unset (&value); } } -- 2.43.5