mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Handle NULL in jid_destroy()
This commit is contained in:
parent
d239a1278b
commit
bbdc341325
16
src/jid.c
16
src/jid.c
@ -105,13 +105,15 @@ jid_create_room_jid(const char * const room, const char * const nick)
|
||||
void
|
||||
jid_destroy(Jid *jid)
|
||||
{
|
||||
FREE_SET_NULL(jid->str);
|
||||
FREE_SET_NULL(jid->localpart);
|
||||
FREE_SET_NULL(jid->domainpart);
|
||||
FREE_SET_NULL(jid->resourcepart);
|
||||
FREE_SET_NULL(jid->barejid);
|
||||
FREE_SET_NULL(jid->fulljid);
|
||||
FREE_SET_NULL(jid);
|
||||
if (jid != NULL) {
|
||||
FREE_SET_NULL(jid->str);
|
||||
FREE_SET_NULL(jid->localpart);
|
||||
FREE_SET_NULL(jid->domainpart);
|
||||
FREE_SET_NULL(jid->resourcepart);
|
||||
FREE_SET_NULL(jid->barejid);
|
||||
FREE_SET_NULL(jid->fulljid);
|
||||
FREE_SET_NULL(jid);
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user