diff options
author | dequis <dx@dxzone.com.ar> | 2015-09-16 03:30:16 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-10-08 01:58:59 -0300 |
commit | 3cbf71d6e8232b8309e927b9f17857ac079a016f (patch) | |
tree | 421e8abb81ff76103f3aaacefbc64bc095c1c680 | |
parent | 355e2ade69fe6555320d8fe5b4b9d3a56c3e6edb (diff) |
jabber: fix null handling with MUC topics
From coverity.
-rw-r--r-- | protocols/jabber/conference.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index 6af9e5ec..bf0d5e2f 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -438,12 +438,13 @@ void jabber_chat_pkt_message(struct im_connection *ic, struct jabber_buddy *bud, } if (subject && chat) { - char *subject_text = subject->text_len > 0 ? subject->text : NULL; + char *subject_text = subject->text_len > 0 ? subject->text : ""; if (g_strcmp0(chat->topic, subject_text) != 0) { bare_jid = (bud) ? jabber_get_bare_jid(bud->ext_jid) : NULL; imcb_chat_topic(chat, bare_jid, subject_text, jabber_get_timestamp(node)); g_free(bare_jid); + bare_jid = NULL; } } |