summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-22 12:59:47 +0200
committerLuke from DC <[email protected]>2022-03-18 06:33:41 +0000
commit67d510c50442471d10d090af04987f7771c1719b (patch)
tree847729577cbb2c86bb67eadc24547f3f4c618ea4 /src
parent42571748603c854f8588c8a99dc6d118cc96b8b4 (diff)
downloadmate-power-manager-67d510c50442471d10d090af04987f7771c1719b.tar.bz2
mate-power-manager-67d510c50442471d10d090af04987f7771c1719b.tar.xz
gpm-prefs: fix memory leak
In addition, it adds enumerations to access indexed arrays.
Diffstat (limited to 'src')
-rw-r--r--src/gpm-prefs.c4
1 files changed, 1 insertions, 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;
}