1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

message: make _handle_error safer

This commit is contained in:
Michael Vetter 2021-03-25 16:50:10 +01:00
parent 3a6bce5a09
commit 8df5e99981

View File

@ -864,9 +864,11 @@ _handle_error(xmpp_stanza_t* const stanza)
} else { } else {
if (type && (strcmp(type, "cancel") == 0)) { if (type && (strcmp(type, "cancel") == 0)) {
Jid* jidp = jid_create(jid); Jid* jidp = jid_create(jid);
if (jidp) {
chat_session_remove(jidp->barejid); chat_session_remove(jidp->barejid);
jid_destroy(jidp); jid_destroy(jidp);
} }
}
ui_handle_recipient_error(jid, err_msg); ui_handle_recipient_error(jid, err_msg);
} }