mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Set prof_ident to NULL after free
This caused the bug mentioned in the PR comment: ``` It seems with the changes done here we get a crash in: src/xmpp/message.c message_handlers_init() when looking up handlers: ProfMessageHandler *handler = g_hash_table_lookup(pubsub_event_handlers, curr->data);. Steps to reproduce: open Profanity and connect /autoping set 10 /autoping timeout 10 stop WiFi/connection wait for Lost connection restart wifi /connect ```
This commit is contained in:
parent
8a5932b251
commit
963ab841b4
@ -247,6 +247,7 @@ connection_disconnect(void)
|
||||
}
|
||||
|
||||
free(prof_identifier);
|
||||
prof_identifier = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
@ -681,7 +682,7 @@ static void _compute_identifier(const char *barejid)
|
||||
assert(b64 != NULL);
|
||||
g_free(hmac);
|
||||
|
||||
//in case of reconnect
|
||||
//in case of reconnect (lost connection)
|
||||
free(prof_identifier);
|
||||
|
||||
prof_identifier = b64;
|
||||
|
Loading…
Reference in New Issue
Block a user