Fix memory leaks from results of gtk_tree_model_get().
[claws.git] / src / prefs_send.c
index 53677eb..811e68b 100644 (file)
@@ -91,9 +91,11 @@ static gboolean _select_by_data_func(GtkTreeModel *model, GtkTreePath *path,
        gtk_tree_model_get(GTK_TREE_MODEL(model), iter, COMBOBOX_DATA, &curdata, -1);
        if ( data != NULL && curdata != NULL && !strcmp(data, curdata) ) {
                gtk_combo_box_set_active_iter(combobox, iter);
+               g_free(curdata);
                return TRUE;
        }
 
+       g_free(curdata);
        return FALSE;
 }
 
@@ -126,6 +128,8 @@ static gboolean _combobox_separator_func(GtkTreeModel *model,
 
        if( txt == NULL )
                return TRUE;
+
+       g_free(txt);
        return FALSE;
 }