Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Fri, 31 May 2013 23:56:31 UTC Commit: d3b88fb5b14d4fc9b4de52cea02888308f7864f6 https://github.com/geany/geany/commit/d3b88fb5b14d4fc9b4de52cea02888308f7864...
Log Message: ----------- Fix a leak searching for the keybinding group row
Modified Paths: -------------- src/prefs.c
Modified: src/prefs.c 8 files changed, 6 insertions(+), 2 deletions(-) =================================================================== @@ -339,19 +339,23 @@ void prefs_kb_search_name(const gchar *search) GtkTreeIter iter; gboolean valid; GtkTreeModel *model; - gchar *name; + model = gtk_tree_view_get_model(tree); valid = gtk_tree_model_get_iter_first(model, &iter); while (valid) { + gchar *name; + gtk_tree_model_get(model, &iter, KB_TREE_ACTION, &name, -1); - if(g_strcmp0(name, search) == 0) + if (g_strcmp0(name, search) == 0) { GtkTreePath *path = gtk_tree_model_get_path(model, &iter); gtk_tree_view_scroll_to_cell(tree, path, NULL, FALSE, .0f, .0f); gtk_tree_path_free(path); + g_free(name); break; } + g_free(name); valid = gtk_tree_model_iter_next(model, &iter); } }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).