fix double-free reported by Sandino Flores-Moreno. Closes bug #413352.

2007-03-01  Jens Granseuer  <jensgr@gmx.net>

	* main.c: (create_dialog): fix double-free reported by Sandino
	Flores-Moreno. Closes bug #413352.

svn path=/trunk/; revision=7351
This commit is contained in:
Jens Granseuer 2007-03-01 18:01:02 +00:00 committed by Jens Granseuer
parent 93d31966a7
commit 79b4f3b6bd
2 changed files with 9 additions and 5 deletions

View file

@ -666,20 +666,19 @@ create_dialog (struct DisplayInfo *info)
resolution = gconf_client_get_string (client, key, NULL);
g_free (key);
g_object_unref (client);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (per_computer_check),
resolution != NULL);
info->was_per_computer = resolution != NULL;
g_free (resolution);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (per_computer_check),
info->was_per_computer);
gtk_widget_show (per_computer_check);
wrapped = wrap_in_label (per_computer_check, _("Options"));
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;