about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-07-22 08:29:05 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-07-22 08:29:05 +0200
commit4641537721df7e89090206802f623213a9abcb1a (patch)
treefbb92cc024f2a05758458833957a253a580372d5 /src
parent25cc479b2f22d25e863f940a9a4d3af71328e6c9 (diff)
downloadprofani-tty-4641537721df7e89090206802f623213a9abcb1a.tar.gz
omemo: always free error and print warning
Fix https://github.com/profanity-im/profanity/issues/1584
Diffstat (limited to 'src')
-rw-r--r--src/omemo/omemo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c
index 560a3473..952fea89 100644
--- a/src/omemo/omemo.c
+++ b/src/omemo/omemo.c
@@ -277,6 +277,9 @@ omemo_on_connect(ProfAccount* account)
     } else if (error->code != G_FILE_ERROR_NOENT) {
         log_warning("[OMEMO] error loading trust from: %s, %s", omemo_ctx.trust_filename->str, error->message);
         g_error_free(error);
+    } else {
+        log_warning("[OMEMO] no such file: %s", omemo_ctx.trust_filename->str);
+        g_error_free(error);
     }
 
     error = NULL;
@@ -285,6 +288,9 @@ omemo_on_connect(ProfAccount* account)
     } else if (error->code != G_FILE_ERROR_NOENT) {
         log_warning("[OMEMO] error loading sessions from: %s, %s", omemo_ctx.sessions_filename->str, error->message);
         g_error_free(error);
+    } else {
+        log_warning("[OMEMO] no such file: %s", omemo_ctx.trust_filename->str);
+        g_error_free(error);
     }
 
     error = NULL;
@@ -293,6 +299,9 @@ omemo_on_connect(ProfAccount* account)
     } else if (error->code != G_FILE_ERROR_NOENT) {
         log_warning("[OMEMO] error loading known devices from: %s, %s", omemo_ctx.known_devices_filename->str, error->message);
         g_error_free(error);
+    } else {
+        log_warning("[OMEMO] no such file: %s", omemo_ctx.trust_filename->str);
+        g_error_free(error);
     }
 }