mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
main: Ensure we always free context, loop and error
In case of early return we may not free them consistently, while this is not a big problem in a main function, is better to have a cleaner management, and we did get valgrind reports.
This commit is contained in:
@ -140,9 +140,9 @@ static gboolean sigterm_callback(gpointer data)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GOptionContext *context;
|
||||
GMainLoop *loop;
|
||||
GError *error = NULL;
|
||||
g_autoptr(GOptionContext) context = NULL;
|
||||
g_autoptr(GMainLoop) loop = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
FprintManager *manager;
|
||||
DBusGProxy *driver_proxy;
|
||||
guint32 request_name_ret;
|
||||
@ -158,7 +158,6 @@ int main(int argc, char **argv)
|
||||
|
||||
if (g_option_context_parse (context, &argc, &argv, &error) == FALSE) {
|
||||
g_warning ("couldn't parse command-line options: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user