gtk+ r21361 - in branches/gtk-2-12: . gtk modules/printbackends/file modules/printbackends/test
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21361 - in branches/gtk-2-12: . gtk modules/printbackends/file modules/printbackends/test
- Date: Fri, 12 Sep 2008 04:02:27 +0000 (UTC)
Author: matthiasc
Date: Fri Sep 12 04:02:27 2008
New Revision: 21361
URL: http://svn.gnome.org/viewvc/gtk+?rev=21361&view=rev
Log:
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.
Modified:
branches/gtk-2-12/ChangeLog
branches/gtk-2-12/gtk/gtkprintjob.c
branches/gtk-2-12/modules/printbackends/file/gtkprintbackendfile.c
branches/gtk-2-12/modules/printbackends/test/gtkprintbackendtest.c
Modified: branches/gtk-2-12/gtk/gtkprintjob.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkprintjob.c (original)
+++ branches/gtk-2-12/gtk/gtkprintjob.c Fri Sep 12 04:02:27 2008
@@ -585,6 +585,7 @@
switch (prop_id)
{
case PROP_TITLE:
+ g_free (priv->title);
priv->title = g_value_dup_string (value);
break;
Modified: branches/gtk-2-12/modules/printbackends/file/gtkprintbackendfile.c
==============================================================================
--- branches/gtk-2-12/modules/printbackends/file/gtkprintbackendfile.c (original)
+++ branches/gtk-2-12/modules/printbackends/file/gtkprintbackendfile.c Fri Sep 12 04:02:27 2008
@@ -239,11 +239,13 @@
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);
}
}
Modified: branches/gtk-2-12/modules/printbackends/test/gtkprintbackendtest.c
==============================================================================
--- branches/gtk-2-12/modules/printbackends/test/gtkprintbackendtest.c (original)
+++ branches/gtk-2-12/modules/printbackends/test/gtkprintbackendtest.c Fri Sep 12 04:02:27 2008
@@ -238,11 +238,13 @@
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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]