mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
server_events: fix potential NULL pointer deref
This commit is contained in:
parent
2fafaec8a7
commit
db18ba8bdf
@ -889,8 +889,8 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
|
|||||||
ProfMucWin *mucwin = wins_get_muc(room);
|
ProfMucWin *mucwin = wins_get_muc(room);
|
||||||
if (mucwin) {
|
if (mucwin) {
|
||||||
mucwin_occupant_nick_change(mucwin, old_nick, nick);
|
mucwin_occupant_nick_change(mucwin, old_nick, nick);
|
||||||
}
|
|
||||||
wins_private_nick_change(mucwin->roomjid, old_nick, nick);
|
wins_private_nick_change(mucwin->roomjid, old_nick, nick);
|
||||||
|
}
|
||||||
free(old_nick);
|
free(old_nick);
|
||||||
|
|
||||||
occupantswin_occupants(room);
|
occupantswin_occupants(room);
|
||||||
@ -907,12 +907,14 @@ sv_ev_muc_occupant_online(const char *const room, const char *const nick, const
|
|||||||
}
|
}
|
||||||
prefs_free_string(muc_status_pref);
|
prefs_free_string(muc_status_pref);
|
||||||
|
|
||||||
|
if (mucwin) {
|
||||||
Jid *jidp = jid_create_from_bare_and_resource(mucwin->roomjid, nick);
|
Jid *jidp = jid_create_from_bare_and_resource(mucwin->roomjid, nick);
|
||||||
ProfPrivateWin *privwin = wins_get_private(jidp->fulljid);
|
ProfPrivateWin *privwin = wins_get_private(jidp->fulljid);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
if (privwin) {
|
if (privwin) {
|
||||||
privwin_occupant_online(privwin);
|
privwin_occupant_online(privwin);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
occupantswin_occupants(room);
|
occupantswin_occupants(room);
|
||||||
rosterwin_roster();
|
rosterwin_roster();
|
||||||
|
Loading…
Reference in New Issue
Block a user