[gnome-builder] libide/gui: fix leak of session state variant
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/gui: fix leak of session state variant
- Date: Mon, 25 Apr 2022 22:42:07 +0000 (UTC)
commit 43e1c1f79a3cdcc9f19d60f5f4077a778624bdd5
Author: Christian Hergert <chergert redhat com>
Date: Mon Apr 25 15:37:25 2022 -0700
libide/gui: fix leak of session state variant
src/libide/gui/ide-session.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/libide/gui/ide-session.c b/src/libide/gui/ide-session.c
index d0de4f1a0..cbf126db8 100644
--- a/src/libide/gui/ide-session.c
+++ b/src/libide/gui/ide-session.c
@@ -505,9 +505,8 @@ load_state_with_migrations (GBytes *bytes)
g_autoptr(GVariant) variant = NULL;
/* This is the value of the "data" key in the final @variant. */
g_autoptr(GVariant) migrated_state = NULL;
- GVariantDict state;
+ g_autoptr(GVariant) old_api_state = NULL;
gboolean fully_migrated = FALSE;
- GVariant *old_api_state = NULL;
g_assert (bytes != NULL);
@@ -519,10 +518,8 @@ load_state_with_migrations (GBytes *bytes)
return NULL;
}
- g_variant_dict_init (&state, variant);
-
/* Handle migrations from prior to the Session API rework, where there was only GbpEditorSessionAddin that
used it */
- old_api_state = g_variant_dict_lookup_value (&state, "GbpEditorSessionAddin", G_VARIANT_TYPE ("a(siiiv)"));
+ old_api_state = g_variant_lookup_value (variant, "GbpEditorSessionAddin", G_VARIANT_TYPE ("a(siiiv)"));
if (old_api_state)
migrated_state = migrate_pre_api_rework (old_api_state);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]