gnome-desktop r5298 - trunk/libgnome-desktop



Author: vuntz
Date: Tue Dec  2 13:51:32 2008
New Revision: 5298
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5298&view=rev

Log:
2008-12-02  Vincent Untz  <vuntz gnome org>

	* gnome-rr-config.c: (handle_start_element), (outputs_free):
	* gnome-rr.c: (output_free): plug leaks.
	Patch by Matthias Clasen <mclasen redhat com>
	Fix bug #549960.


Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/gnome-rr-config.c
   trunk/libgnome-desktop/gnome-rr.c

Modified: trunk/libgnome-desktop/gnome-rr-config.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr-config.c	(original)
+++ trunk/libgnome-desktop/gnome-rr-config.c	Tue Dec  2 13:51:32 2008
@@ -187,7 +187,7 @@
 	
 	parser->configuration = g_new0 (GnomeRRConfig, 1);
 	parser->configuration->clone = FALSE;
-	parser->configuration->outputs = g_new0 (GnomeOutputInfo *, 1);
+	parser->configuration->outputs = NULL;
     }
     else if (strcmp (name, "monitors") == 0)
     {
@@ -657,6 +657,8 @@
 
     for (i = 0; outputs[i] != NULL; ++i)
 	output_free (outputs[i]);
+
+    g_free (outputs);
 }
 
 void

Modified: trunk/libgnome-desktop/gnome-rr.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr.c	(original)
+++ trunk/libgnome-desktop/gnome-rr.c	Tue Dec  2 13:51:32 2008
@@ -807,6 +807,11 @@
 static void
 output_free (GnomeRROutput *output)
 {
+    g_free (output->clones);
+    g_free (output->modes);
+    g_free (output->possible_crtcs);
+    g_free (output->edid_data);
+    g_free (output->name);
     g_free (output);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]