[gnome-builder] code-index: free info before breaking out of loop



commit 4672688d9521dbefddc4a4ffc2669756dbab9c17
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 7 13:55:50 2018 -0700

    code-index: free info before breaking out of loop
    
    This fixes a minor leak of FileInfo (last one per directory).

 src/plugins/code-index/ide-code-index-builder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/code-index/ide-code-index-builder.c b/src/plugins/code-index/ide-code-index-builder.c
index 0c2ddc968..01723e52e 100644
--- a/src/plugins/code-index/ide-code-index-builder.c
+++ b/src/plugins/code-index/ide-code-index-builder.c
@@ -526,10 +526,10 @@ filter_ignored (IdeVcs            *vcs,
         {
           GList *tmp = iter->next;
           g_queue_delete_link (file_infos, iter);
+          file_info_free (info);
           if (tmp == NULL)
             break;
           iter = tmp;
-          file_info_free (info);
           goto again;
         }
     }


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