Permalink
Browse files

gproject: Get rid of some memory leaks

Thanks to Pavel Roschin.
  • Loading branch information...
1 parent bc6c972 commit 90ae03d4ad87bb71bfabbe686c285e8d8a0037a5 @techee techee committed May 14, 2014
Showing with 5 additions and 3 deletions.
  1. +3 −3 gproject/src/gproject-project.c
  2. +2 −0 gproject/src/gproject-sidebar.c
@@ -473,9 +473,9 @@ void gprj_project_close(void)
deferred_op_queue_clean();
- g_free(g_prj->source_patterns);
- g_free(g_prj->header_patterns);
- g_free(g_prj->ignored_dirs_patterns);
+ g_strfreev(g_prj->source_patterns);
+ g_strfreev(g_prj->header_patterns);
+ g_strfreev(g_prj->ignored_dirs_patterns);
g_hash_table_destroy(g_prj->file_tag_table);
@@ -185,12 +185,14 @@ static gchar *build_path(GtkTreeIter *iter)
path = g_strdup(name);
else
setptr(path, g_build_filename(name, path, NULL));
+ g_free(name);
node = parent;
}
gtk_tree_model_get(model, &node, FILEVIEW_COLUMN_NAME, &name, -1);
setptr(path, g_build_filename(name, path, NULL));
+ g_free(name);
setptr(path, g_build_filename(geany_data->app->project->base_path, path, NULL));

0 comments on commit 90ae03d

Please sign in to comment.