From 67d510c50442471d10d090af04987f7771c1719b Mon Sep 17 00:00:00 2001 From: rbuj Date: Fri, 22 Oct 2021 12:59:47 +0200 Subject: gpm-prefs: fix memory leak In addition, it adds enumerations to access indexed arrays. --- src/gpm-prefs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gpm-prefs.c b/src/gpm-prefs.c index 69848a2..1c5b1d2 100644 --- a/src/gpm-prefs.c +++ b/src/gpm-prefs.c @@ -84,6 +84,7 @@ main (int argc, char **argv) g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); g_option_context_add_group (context, gtk_get_option_group (FALSE)); g_option_context_parse (context, &argc, &argv, NULL); + g_option_context_free (context); gdk_init (&argc, &argv); app = gtk_application_new("org.mate.PowerManager.Preferences", 0); @@ -103,8 +104,5 @@ main (int argc, char **argv) g_object_unref (app); -/* seems to not work... - g_option_context_free (context); */ - return status; } -- cgit v1.2.1