1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

omemo: always free error and print warning

Fix https://github.com/profanity-im/profanity/issues/1584
This commit is contained in:
Michael Vetter 2021-07-22 08:29:05 +02:00
parent 25cc479b2f
commit 4641537721

View File

@ -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);
}
}