From 516ce851fb1116b81c873783e428597f1b421152 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 29 Aug 2008 18:14:32 +0000 Subject: =?UTF-8?q?Bug=20549810=20=E2=80=93=20Memory=20leaks=20in=20printi?= =?UTF-8?q?ng=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=21241 --- modules/printbackends/file/gtkprintbackendfile.c | 4 +++- modules/printbackends/test/gtkprintbackendtest.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') 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); } } -- cgit v1.2.1