From 4641537721df7e89090206802f623213a9abcb1a Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 22 Jul 2021 08:29:05 +0200 Subject: omemo: always free error and print warning Fix https://github.com/profanity-im/profanity/issues/1584 --- src/omemo/omemo.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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); } } -- cgit 1.4.1-2-gfad0