From 827baff30181978f445790b6b6ef899dd51ba813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 29 Jan 2020 22:37:22 +0100 Subject: [PATCH] enroll: Cleanup error with autoptr --- utils/enroll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/enroll.c b/utils/enroll.c index 8c32faf..43657b7 100644 --- a/utils/enroll.c +++ b/utils/enroll.c @@ -179,7 +179,7 @@ int main(int argc, char **argv) { g_autoptr(FprintDBusDevice) dev = NULL; GOptionContext *context; - GError *err = NULL; + g_autoptr(GError) err = NULL; setlocale (LC_ALL, ""); @@ -188,7 +188,6 @@ int main(int argc, char **argv) if (g_option_context_parse (context, &argc, &argv, &err) == FALSE) { g_print ("couldn't parse command-line options: %s\n", err->message); - g_error_free (err); return 1; }