diff options
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); } } |