gtk+ r21241 - in trunk: . gtk modules/printbackends/file modules/printbackends/test
- From: cdywan svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21241 - in trunk: . gtk modules/printbackends/file modules/printbackends/test
- Date: Fri, 29 Aug 2008 18:14:32 +0000 (UTC)
Author: cdywan
Date: Fri Aug 29 18:14:32 2008
New Revision: 21241
URL: http://svn.gnome.org/viewvc/gtk+?rev=21241&view=rev
Log:
Bug 549810 â Memory leaks in printing code
Modified:
trunk/ChangeLog
trunk/gtk/gtkprintjob.c
trunk/modules/printbackends/file/gtkprintbackendfile.c
trunk/modules/printbackends/test/gtkprintbackendtest.c
Modified: trunk/gtk/gtkprintjob.c
==============================================================================
--- trunk/gtk/gtkprintjob.c (original)
+++ trunk/gtk/gtkprintjob.c Fri Aug 29 18:14:32 2008
@@ -585,6 +585,7 @@
switch (prop_id)
{
case PROP_TITLE:
+ g_free (priv->title);
priv->title = g_value_dup_string (value);
break;
Modified: trunk/modules/printbackends/file/gtkprintbackendfile.c
==============================================================================
--- trunk/modules/printbackends/file/gtkprintbackendfile.c (original)
+++ trunk/modules/printbackends/file/gtkprintbackendfile.c Fri Aug 29 18:14:32 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);
}
}
Modified: trunk/modules/printbackends/test/gtkprintbackendtest.c
==============================================================================
--- trunk/modules/printbackends/test/gtkprintbackendtest.c (original)
+++ trunk/modules/printbackends/test/gtkprintbackendtest.c Fri Aug 29 18:14:32 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]