diff options
author | James Booth <boothj5@gmail.com> | 2013-01-13 01:47:29 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-01-13 01:47:29 +0000 |
commit | d827abddb7947a4872a20e3e2832cf2ae2f492ef (patch) | |
tree | feab13ba62122ddb6e7b190183ccb89b910143c1 /src | |
parent | b6f36673900939ad171b84bb088d82226d06285a (diff) | |
download | profani-tty-d827abddb7947a4872a20e3e2832cf2ae2f492ef.tar.gz |
Added jid_destroy()
Diffstat (limited to 'src')
-rw-r--r-- | src/jid.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/jid.c b/src/jid.c index 90d225bc..7955b98c 100644 --- a/src/jid.c +++ b/src/jid.c @@ -25,6 +25,7 @@ #include <glib.h> +#include "common.h" #include "jid.h" Jid * @@ -110,6 +111,17 @@ jid_create_room_jid(const char * const room, const char * const nick) return result; } +void +jid_destroy(Jid *jid) +{ + 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); +} + /* * Given a full room JID of the form * room@server/nick |