about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-01-13 18:21:26 +0000
committerJames Booth <boothj5@gmail.com>2013-01-13 18:21:26 +0000
commit18a4f7da0ea652a5dce3275e183674e4e874aed1 (patch)
tree83c53271270d2868c81720c020478f0cff19ce70
parentd87c20e6665886575b9f497115ac47e069d84cd6 (diff)
downloadprofani-tty-18a4f7da0ea652a5dce3275e183674e4e874aed1.tar.gz
Fix segfault by setting room subject to NULL on creation
-rw-r--r--src/muc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/muc.c b/src/muc.c
index 67c38ee5..79cf1208 100644
--- a/src/muc.c
+++ b/src/muc.c
@@ -58,6 +58,7 @@ muc_join_room(const char * const room, const char * const nick)
     ChatRoom *new_room = malloc(sizeof(ChatRoom));
     new_room->room = strdup(room);
     new_room->nick = strdup(nick);
+    new_room->subject = NULL;
     new_room->roster = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
         (GDestroyNotify)p_contact_free);
     new_room->nick_ac = p_autocomplete_new();