[gnome-builder] gettext: don't leak diagnostics
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gettext: don't leak diagnostics
- Date: Thu, 12 May 2016 14:45:54 +0000 (UTC)
commit c4a20182c7573cde6c00f04d990f7bec520c3ed0
Author: Christian Hergert <chergert redhat com>
Date: Thu May 12 17:45:09 2016 +0300
gettext: don't leak diagnostics
plugins/gettext/ide-gettext-diagnostic-provider.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gettext/ide-gettext-diagnostic-provider.c
b/plugins/gettext/ide-gettext-diagnostic-provider.c
index 4958d05..7697f54 100644
--- a/plugins/gettext/ide-gettext-diagnostic-provider.c
+++ b/plugins/gettext/ide-gettext-diagnostic-provider.c
@@ -271,6 +271,7 @@ subprocess_wait_cb (GObject *source_object,
{
GSubprocess *subprocess = G_SUBPROCESS (source_object);
g_autoptr(GTask) task = user_data;
+ g_autoptr(IdeDiagnostics) local_diags = NULL;
TranslationUnit *unit = g_task_get_task_data (task);
GPtrArray *array = NULL;
IdeGettextDiagnostics *diags;
@@ -330,8 +331,9 @@ subprocess_wait_cb (GObject *source_object,
}
out:
+ local_diags = ide_diagnostics_new (array);
diags = g_object_new (IDE_TYPE_GETTEXT_DIAGNOSTICS,
- "diagnostics", ide_diagnostics_new (array),
+ "diagnostics", local_diags,
"sequence", ide_unsaved_file_get_sequence (unit->unsaved_file),
NULL);
g_task_return_pointer (task, diags, g_object_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]