[geany/geany] e409b7: Fix various TMTag leaks
Colomban Wendling
git-noreply at xxxxx
Sun Mar 17 16:31:36 UTC 2013
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 17 Mar 2013 16:31:36 UTC
Commit: e409b70fab4f01a5e35db06d1ba6aa8ecd97b230
https://github.com/geany/geany/commit/e409b70fab4f01a5e35db06d1ba6aa8ecd97b230
Log Message:
-----------
Fix various TMTag leaks
Modified Paths:
--------------
src/document.c
src/symbols.c
Modified: src/document.c
3 files changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -605,6 +605,9 @@ static gboolean remove_page(guint page_num)
g_free(doc->real_path);
tm_workspace_remove_object(doc->tm_file, TRUE, TRUE);
+ if (doc->priv->tag_tree)
+ gtk_widget_destroy(doc->priv->tag_tree);
+
editor_destroy(doc->editor);
doc->editor = NULL; /* needs to be NULL for document_undo_clear() call below */
Modified: src/symbols.c
6 files changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -1525,6 +1525,7 @@ static void update_tree_tags(GeanyDocument *doc, GList **tags)
delta = d;
parent_search = node->data;
}
+ tm_tag_unref(parent_tag);
}
}
@@ -2300,7 +2301,7 @@ static void on_find_usage(GtkWidget *widget, gboolean in_session)
GtkTreeSelection *selection;
GtkTreeModel *model;
GeanyDocument *doc;
- const TMTag *tag = NULL;
+ TMTag *tag = NULL;
doc = document_get_current();
if (!doc)
@@ -2310,7 +2311,10 @@ static void on_find_usage(GtkWidget *widget, gboolean in_session)
if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
if (tag)
+ {
search_find_usage(tag->name, tag->name, SCFIND_WHOLEWORD | SCFIND_MATCHCASE, in_session);
+ tm_tag_unref(tag);
+ }
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list