[gnome-builder] clang: plug leak in lazy init of completion item



commit 8246c896148223cbaa48bda51711de3e68139a0c
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jan 13 04:00:43 2018 -0800

    clang: plug leak in lazy init of completion item

 src/plugins/clang/ide-clang-completion-item.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/clang/ide-clang-completion-item.c b/src/plugins/clang/ide-clang-completion-item.c
index ff6a64540..872782de6 100644
--- a/src/plugins/clang/ide-clang-completion-item.c
+++ b/src/plugins/clang/ide-clang-completion-item.c
@@ -23,6 +23,7 @@
 
 #include "ide-clang-completion-item.h"
 #include "ide-clang-completion-item-private.h"
+#include "ide-clang-private.h"
 
 static void completion_proposal_iface_init (GtkSourceCompletionProposalIface *);
 
@@ -135,7 +136,7 @@ ide_clang_completion_item_lazy_init (IdeClangCompletionItem *self)
       enum CXCompletionChunkKind kind;
       const gchar *text;
       g_autofree gchar *escaped = NULL;
-      CXString cxstr;
+      g_auto(CXString) cxstr = {0};
 
       kind = clang_getCompletionChunkKind (result->CompletionString, i);
       cxstr = clang_getCompletionChunkText (result->CompletionString, i);


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