Fix memory leaks from results of gtk_tree_model_get().
[claws.git] / src / prefs_summaries.c
index 7e131dc5861baa213e0f9c67cd63649d381d369c..16ae791daff7fd09227e8a4cb299cd3fb6938e6a 100644 (file)
@@ -304,8 +304,6 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
                         G_CALLBACK(date_format_entry_on_change),
                         label3);
 
-       gtk_window_set_position(GTK_WINDOW(datefmt_win), GTK_WIN_POS_CENTER);
-
        gtk_widget_show(datefmt_win);
        manage_window_set_transient(GTK_WINDOW(datefmt_win));
        gtk_window_set_modal(GTK_WINDOW(datefmt_win), TRUE);
@@ -891,6 +889,7 @@ static void date_format_select_row(GtkTreeView *list_view,
        strncpy(new_format, old_format, cur_pos);
        new_format[cur_pos] = '\0';
        strcat(new_format, format);
+       g_free(format);
        strcat(new_format, &old_format[cur_pos]);
 
        gtk_entry_set_text(GTK_ENTRY(datefmt_sample), new_format);