free 'resolution' string after using it, not before. Found by Kjartan

2006-08-18  Rodrigo Moya <rodrigo@novell.com>

	* main.c (create_dialog): free 'resolution' string after using it,
	not before. Found by Kjartan Maraas  <kmaraas@gnome.org>.
This commit is contained in:
Rodrigo Moya 2006-08-18 11:35:32 +00:00 committed by Rodrigo Moya
parent 94d5b9fb1d
commit 925d55eb2d
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2006-08-18 Rodrigo Moya <rodrigo@novell.com>
* main.c (create_dialog): free 'resolution' string after using it,
not before. Found by Kjartan Maraas <kmaraas@gnome.org>.
2006-08-07 Rodrigo Moya <rodrigo@novell.com>
Fixes #348838

View file

@ -664,7 +664,6 @@ create_dialog (struct DisplayInfo *info)
client = gconf_client_get_default ();
key = g_strconcat ("/desktop/gnome/screen/", hostname, "/0/resolution",NULL);
resolution = gconf_client_get_string (client, key, NULL);
g_free (resolution);
g_free (key);
g_object_unref (client);
@ -678,6 +677,8 @@ create_dialog (struct DisplayInfo *info)
gtk_box_pack_start (GTK_BOX (vbox),
wrapped, FALSE, FALSE, 0);
gtk_widget_show (wrapped);
g_free (resolution);
}
info->per_computer_check = per_computer_check;