[gnome-builder] create-project: Fix memory leaks



commit 3746bcae2d6685fa48ab6c514e7848303e0d059f
Author: Matthew Leeds <mleeds redhat com>
Date:   Wed Mar 22 17:10:41 2017 -0500

    create-project: Fix memory leaks

 plugins/create-project/gbp-create-project-tool.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/create-project/gbp-create-project-tool.c 
b/plugins/create-project/gbp-create-project-tool.c
index 2e41e83..3f96588 100644
--- a/plugins/create-project/gbp-create-project-tool.c
+++ b/plugins/create-project/gbp-create-project-tool.c
@@ -117,7 +117,7 @@ gbp_create_project_tool_list_templates (GbpCreateProjectTool *self)
   for (iter = self->project_templates; iter != NULL; iter = iter->next)
     {
       IdeProjectTemplate *template = iter->data;
-      const gchar *id;
+      g_autofree gchar *id = NULL;
 
       if (NULL != (id = ide_project_template_get_id (template)))
         g_print ("  %s\n", id);
@@ -166,7 +166,7 @@ find_template (GbpCreateProjectTool *self)
   for (iter = self->project_templates; iter != NULL; iter = iter->next)
     {
       IdeProjectTemplate *template = IDE_PROJECT_TEMPLATE (iter->data);
-      const gchar *id = ide_project_template_get_id (template);
+      g_autofree gchar *id = ide_project_template_get_id (template);
 
       if (g_strcmp0 (self->template, id) == 0)
         return template;


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