summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tool/secret-tool.c7
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;
}