From 352fa617c0a8bada72d2c816a1f5aa7e7fa61d44 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 11 May 2023 14:05:07 -0700 Subject: [PATCH] libsysprof-analyze: fix transfer ownership of refstring --- src/libsysprof-analyze/sysprof-document-symbols.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libsysprof-analyze/sysprof-document-symbols.c b/src/libsysprof-analyze/sysprof-document-symbols.c index f7c0f796..2f06a79d 100644 --- a/src/libsysprof-analyze/sysprof-document-symbols.c +++ b/src/libsysprof-analyze/sysprof-document-symbols.c @@ -161,8 +161,7 @@ sysprof_document_symbols_worker (GTask *task, /* Create static symbols for context switch use */ for (guint cs = 0; cs < G_N_ELEMENTS (context_switches); cs++) { - g_autoptr(GRefString) name = g_ref_string_new_intern (context_switches[cs].name); - g_autoptr(SysprofSymbol) symbol = _sysprof_symbol_new (name, NULL, NULL, 0, 0); + g_autoptr(SysprofSymbol) symbol = _sysprof_symbol_new (g_ref_string_new_intern (context_switches[cs].name), NULL, NULL, 0, 0); /* TODO: It would be nice if we had enough insight from the capture header * as to the host system, so we can show "vmlinuz" and "Linux" respectively