diff options
author | Daiki Ueno <dueno@src.gnome.org> | 2021-04-03 06:50:37 +0200 |
---|---|---|
committer | Daiki Ueno <dueno@src.gnome.org> | 2021-04-03 07:23:51 +0200 |
commit | 9472b0ab390d3a3be3d58691db06ee11977f0bff (patch) | |
tree | a65818088b6039895e256a24bf484c3a139ea99c | |
parent | 78223a0471e9cff639a279c45df91e9dc691738b (diff) | |
download | libsecret-wip/dueno/secret-tool-crash.tar.gz |
secret-tool: Fix secret_password_clearv_sync return value checkwip/dueno/secret-tool-crash
This was a regression introduced in the rewrite using the simple
API (commit 6886aebb0457d752f348a4cedc5a11ce109544ee).
Reported by Chih-Hsuan Yen in:
https://gitlab.gnome.org/GNOME/libsecret/-/issues/56
Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
-rw-r--r-- | tool/secret-tool.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/secret-tool.c b/tool/secret-tool.c index 5d95194..9335e37 100644 --- a/tool/secret-tool.c +++ b/tool/secret-tool.c @@ -142,7 +142,10 @@ secret_tool_action_clear (int argc, g_hash_table_unref (attributes); if (!ret) { - g_printerr ("%s: %s\n", g_get_prgname (), error->message); + if (error != NULL) { + g_printerr ("%s: %s\n", g_get_prgname (), error->message); + g_error_free (error); + } return 1; } @@ -215,6 +218,7 @@ secret_tool_action_lookup (int argc, if (error != NULL) { g_printerr ("%s: %s\n", g_get_prgname (), error->message); + g_error_free (error); return 1; } @@ -482,6 +486,7 @@ secret_tool_action_search (int argc, if (error != NULL) { g_printerr ("%s: %s\n", g_get_prgname (), error->message); + g_error_free (error); return 1; } |