# HG changeset patch # User Eric Polino # Date 1183659332 0 # Node ID 3ec3d55a1e372f1e247c527696739ca06221487b # Parent 2c7114561553603876a364f61ede5612e5374685 FIX: Setting combo_box doesn't cause memory corruption. diff -r 2c7114561553 -r 3ec3d55a1e37 finch/gntsound.c --- a/finch/gntsound.c Fri Jun 29 21:59:48 2007 +0000 +++ b/finch/gntsound.c Thu Jul 05 18:15:32 2007 +0000 @@ -603,7 +603,6 @@ GntWidget *label; GntWidget *win; - gchar *buf; if(pref_dialog){ gnt_window_present(pref_dialog->window); @@ -628,9 +627,7 @@ gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"beep",_("Console Beep")); gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"custom",_("Command")); gnt_combo_box_add_data(GNT_COMBO_BOX(cmbox),"nosound",_("No Sound")); - buf = g_strdup(purple_prefs_get_string(FINCH_PREFS_ROOT "/sound/method")); - gnt_combo_box_set_selected(GNT_COMBO_BOX(cmbox),buf); - g_free(buf); + gnt_combo_box_set_selected(GNT_COMBO_BOX(cmbox),(gchar *)purple_prefs_get_string(FINCH_PREFS_ROOT "/sound/method")); label = gnt_label_new_with_format(_("Sound Method"),GNT_TEXT_FLAG_BOLD); gnt_box_add_widget(GNT_BOX(win),label);