summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChristian Dywan <cdywan@src.gnome.org>2008-08-29 18:14:32 +0000
committerChristian Dywan <cdywan@src.gnome.org>2008-08-29 18:14:32 +0000
commit516ce851fb1116b81c873783e428597f1b421152 (patch)
tree73c94942f5a831d576fa8916dc3dd727590f5165 /modules
parent2faae9fd1d67cedef36baafc818bd0b45d031184 (diff)
downloadgdk-pixbuf-516ce851fb1116b81c873783e428597f1b421152.tar.gz
Bug 549810 – Memory leaks in printing code
svn path=/trunk/; revision=21241
Diffstat (limited to 'modules')
-rw-r--r--modules/printbackends/file/gtkprintbackendfile.c4
-rw-r--r--modules/printbackends/test/gtkprintbackendtest.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/file/gtkprintbackendfile.c
index 43b96f457..070a69a9e 100644
--- a/modules/printbackends/file/gtkprintbackendfile.c
+++ b/modules/printbackends/file/gtkprintbackendfile.c
@@ -238,11 +238,13 @@ output_file_from_settings (GtkPrintSettings *settings,
if (locale_name != NULL)
{
- path = g_build_filename (g_get_current_dir (), locale_name, NULL);
+ gchar *current_dir = g_get_current_dir ();
+ path = g_build_filename (current_dir, locale_name, NULL);
g_free (locale_name);
uri = g_filename_to_uri (path, NULL, NULL);
g_free (path);
+ g_free (current_dir);
}
}
diff --git a/modules/printbackends/test/gtkprintbackendtest.c b/modules/printbackends/test/gtkprintbackendtest.c
index 73ce61b7b..c8ff0021d 100644
--- a/modules/printbackends/test/gtkprintbackendtest.c
+++ b/modules/printbackends/test/gtkprintbackendtest.c
@@ -238,11 +238,13 @@ output_test_from_settings (GtkPrintSettings *settings,
if (locale_name != NULL)
{
- path = g_build_filename (g_get_current_dir (), locale_name, NULL);
+ gchar *current_dir = g_get_current_dir ();
+ path = g_build_filename (current_dir, locale_name, NULL);
g_free (locale_name);
uri = g_filename_to_uri (path, NULL, NULL);
g_free (path);
+ g_free (current_dir);
}
}