From 7dac81dcadab874925268d7fa763af0ee40b0a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 4 Feb 2020 20:03:03 +0100 Subject: [PATCH] device: Use g_clear_error instead of doing the same manually We've now an utility function that can help us to free and unset an error double pointer, so let's use it. --- src/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index bdb5304..107eac3 100644 --- a/src/device.c +++ b/src/device.c @@ -476,8 +476,7 @@ _fprint_device_check_polkit_for_actions (FprintDevice *rdev, if (_fprint_device_check_polkit_for_action (rdev, context, action1, error) != FALSE) return TRUE; - g_error_free (*error); - *error = NULL; + g_clear_error (error); return _fprint_device_check_polkit_for_action (rdev, context, action2, error); }