[gnome-builder/wip/greeter] mine: don't leak GFileInfo while enumerating
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/greeter] mine: don't leak GFileInfo while enumerating
- Date: Sun, 10 May 2015 17:16:57 +0000 (UTC)
commit 92f6ce15cfdf0502ad75a251ed3618286eb3824b
Author: Christian Hergert <christian hergert me>
Date: Sun May 10 10:16:49 2015 -0700
mine: don't leak GFileInfo while enumerating
libide/autotools/ide-autotools-project-miner.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libide/autotools/ide-autotools-project-miner.c b/libide/autotools/ide-autotools-project-miner.c
index 97ccf36..7362d6f 100644
--- a/libide/autotools/ide-autotools-project-miner.c
+++ b/libide/autotools/ide-autotools-project-miner.c
@@ -65,7 +65,11 @@ ide_autotools_project_miner_find_doap (IdeAutotoolsProjectMiner *self,
while ((file_info = g_file_enumerator_next_file (enumerator, cancellable, NULL)))
{
- const gchar *name = g_file_info_get_name (file_info);
+ g_autofree gchar *name = NULL;
+
+ name = g_file_info_get_name (file_info);
+
+ g_clear_object (&file_info);
if (name != NULL && g_str_has_suffix (name, ".doap"))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]