Skip to content

Commit

Permalink
gpm-prefs: fix memory leak
Browse files Browse the repository at this point in the history
In addition, it adds enumerations to access indexed arrays.
  • Loading branch information
rbuj committed Dec 8, 2021
1 parent eee89e4 commit 3e0af8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/gpm-prefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -103,8 +104,5 @@ main (int argc, char **argv)

g_object_unref (app);

/* seems to not work...
g_option_context_free (context); */

return status;
}

0 comments on commit 3e0af8c

Please sign in to comment.