From d017e6749cacf8770726308084eefac3d746a50b Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Thu, 9 Feb 2017 18:09:21 -0800 Subject: [PATCH] main: Destroy GjsContext before exit Here are a few places where I missed it before: the GjsContext must be unrefed before exiting, or it will crash on exit. https://bugzilla.gnome.org/show_bug.cgi?id=778425 --- src/gnome-shell-plugin.c | 1 + src/main.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c index ab5ebec6e..35b9995ea 100644 --- a/src/gnome-shell-plugin.c +++ b/src/gnome-shell-plugin.c @@ -239,6 +239,7 @@ gnome_shell_plugin_start (MetaPlugin *plugin) * If there was a generic "hook into bug-buddy for non-C crashes" * infrastructure, here would be the place to put it. */ + g_object_unref (gjs_context); exit (1); } } diff --git a/src/main.c b/src/main.c index c88f04642..dbf0e3bd7 100644 --- a/src/main.c +++ b/src/main.c @@ -360,6 +360,7 @@ list_modes (const char *option_name, if (!gjs_context_eval (context, script, -1, "
", &status, NULL)) g_message ("Retrieving list of available modes failed."); + g_object_unref (context); exit (status); }