mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 02:06:21 +00:00
Don't unload OMEMO cryto on disconnect if OMEMO wasn't loaded
If OMEMO wasn't loaded, removing key would create empty identity.txt file. Then at load time it would segfault profanity. Another commit should fix load of malformed identity.txt.
This commit is contained in:
@@ -241,6 +241,10 @@ omemo_on_connect(ProfAccount *account)
|
||||
void
|
||||
omemo_on_disconnect(void)
|
||||
{
|
||||
if (!loaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
signal_protocol_signed_pre_key_remove_key(omemo_ctx.store, omemo_ctx.signed_pre_key_id);
|
||||
_g_hash_table_free(omemo_ctx.signed_pre_key_store);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user