diff options
author | Christian Dywan <cdywan@src.gnome.org> | 2008-08-29 18:14:32 +0000 |
---|---|---|
committer | Christian Dywan <cdywan@src.gnome.org> | 2008-08-29 18:14:32 +0000 |
commit | 516ce851fb1116b81c873783e428597f1b421152 (patch) | |
tree | 73c94942f5a831d576fa8916dc3dd727590f5165 /modules | |
parent | 2faae9fd1d67cedef36baafc818bd0b45d031184 (diff) | |
download | gtk+-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.c | 4 | ||||
-rw-r--r-- | modules/printbackends/test/gtkprintbackendtest.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/file/gtkprintbackendfile.c index 43b96f457c..070a69a9e4 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 73ce61b7bd..c8ff0021d8 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); } } |