Fix a memory leak.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3711 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-04-16 17:57:29 +00:00
parent 1c1306341b
commit 075f2d3e7f

View File

@ -277,6 +277,7 @@ static gboolean find_tree_iter_dir(GtkTreeIter *iter, const gchar *dir)
{ {
GeanyDocument *doc; GeanyDocument *doc;
gchar *name; gchar *name;
gboolean result;
if (utils_str_equal(dir, ".")) if (utils_str_equal(dir, "."))
dir = GEANY_STRING_UNTITLED; dir = GEANY_STRING_UNTITLED;
@ -285,7 +286,11 @@ static gboolean find_tree_iter_dir(GtkTreeIter *iter, const gchar *dir)
g_return_val_if_fail(!doc, FALSE); g_return_val_if_fail(!doc, FALSE);
gtk_tree_model_get(GTK_TREE_MODEL(store_openfiles), iter, DOCUMENTS_SHORTNAME, &name, -1); gtk_tree_model_get(GTK_TREE_MODEL(store_openfiles), iter, DOCUMENTS_SHORTNAME, &name, -1);
return utils_str_equal(name, dir);
result = utils_str_equal(name, dir);
g_free(name);
return result;
} }