Bug 549810 – Memory leaks in printing code

svn path=/trunk/; revision=21241
This commit is contained in:
Christian Dywan
2008-08-29 18:14:32 +00:00
parent 2faae9fd1d
commit 516ce851fb
4 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,14 @@
2008-08-29 Christian Dywan <christian@imendio.com>
Bug 549810 Memory leaks in printing code
* gtk/gtkprintjob.c (gtk_print_job_set_property):
* modules/printbackends/file/gtkprintbackendfile.c
(output_file_from_settings):
* modules/printbackends/test/gtkprintbackendtest.c
(output_test_from_settings): free some temporary strings.
Patch by Yevgen Muntyan.
2008-08-29 Michael Natterer <mitch@imendio.com>
* gtk/gtkwidget.h: move the gtk_widget_get_parent() and

View File

@ -585,6 +585,7 @@ gtk_print_job_set_property (GObject *object,
switch (prop_id)
{
case PROP_TITLE:
g_free (priv->title);
priv->title = g_value_dup_string (value);
break;

View File

@ -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);
}
}

View File

@ -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);
}
}