diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2020-02-04 20:01:15 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2020-02-14 16:00:20 +0100 |
commit | 554df2a8d9bf606ff109707d13ae3ab0bdf3723b (patch) | |
tree | d1b4f06964da2874d0b15e67d0fd9ef1c19fda38 /utils | |
parent | 681bd1ed2add52660feab01f2934f722adc664e7 (diff) |
utils: Fix memory leak when error is ignored in list
If we get a `NoEnrolledPrints` error while list, we don't consider it an
hard error and in such case we proceed to releasing the device, but without
clearing the previously set error first.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/list.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/list.c b/utils/list.c index 2284c4c..8098c0c 100644 --- a/utils/list.c +++ b/utils/list.c @@ -55,6 +55,7 @@ static void list_fingerprints(DBusGProxy *dev, const char *username) g_print("ListEnrolledFingers failed: %s\n", error->message); exit (1); } else { + g_clear_error (&error); fingers = NULL; } } |