[gnome-builder/gnome-builder-3-26] clang: don't leak source location when building diagnostic



commit 6be09d1704838709a5b09569fdf56bd3bc0ab9ba
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 3 05:02:16 2018 -0800

    clang: don't leak source location when building diagnostic

 plugins/clang/ide-clang-translation-unit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/clang/ide-clang-translation-unit.c b/plugins/clang/ide-clang-translation-unit.c
index 6e20e72..54a327b 100644
--- a/plugins/clang/ide-clang-translation-unit.c
+++ b/plugins/clang/ide-clang-translation-unit.c
@@ -321,7 +321,7 @@ create_diagnostic (IdeClangTranslationUnit *self,
   enum CXDiagnosticSeverity cxseverity;
   IdeDiagnosticSeverity severity;
   IdeDiagnostic *diag;
-  IdeSourceLocation *loc;
+  g_autoptr(IdeSourceLocation) loc = NULL;
   g_autofree gchar *spelling = NULL;
   CXString cxstr;
   CXSourceLocation cxloc;


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