[gnome-builder] makecache: move matchinfo into closest scope



commit 667606de082a3f97eae7255fa4215076ecbaf5b3
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 12 18:55:31 2016 -0700

    makecache: move matchinfo into closest scope
    
    This was resulting in a pretty massive amount of leaked match info.

 plugins/autotools/ide-makecache.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/autotools/ide-makecache.c b/plugins/autotools/ide-makecache.c
index b225f76..fd509c7 100644
--- a/plugins/autotools/ide-makecache.c
+++ b/plugins/autotools/ide-makecache.c
@@ -256,7 +256,6 @@ ide_makecache_get_file_targets_searched (GMappedFile *mapped,
   g_autofree gchar *regexstr = NULL;
   g_autofree gchar *subdir = NULL;
   g_autoptr(GHashTable) found = NULL;
-  g_autoptr(GMatchInfo) match_info = NULL;
   g_autoptr(GPtrArray) targets = NULL;
   g_autoptr(GRegex) regex = NULL;
   const gchar *content;
@@ -306,6 +305,8 @@ ide_makecache_get_file_targets_searched (GMappedFile *mapped,
 
   while ((line = ide_line_reader_next (&rl, &line_len)))
     {
+      g_autoptr(GMatchInfo) match_info = NULL;
+
       /*
        * Keep track of "subdir = <dir>" changes so we know what directory
        * to launch make from.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]