about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-01-24 13:37:28 +0000
committerJames Booth <boothj5@gmail.com>2017-01-24 13:37:28 +0000
commitb712820c999e824771c683175ed41b392328ffa0 (patch)
tree9ded8e7f897bcbf5c823ff9af33375ad2e3708dd /src
parent8e75437a7e43d4c55e861691f74892e666e29b0b (diff)
downloadprofani-tty-b712820c999e824771c683175ed41b392328ffa0.tar.gz
Check barejid in carbons
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/message.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 3f8ad5a0..d78e891f 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -716,8 +716,7 @@ _handle_carbons(xmpp_stanza_t *const stanza)
 
     Jid *my_jid = jid_create(connection_get_fulljid());
     const char *const stanza_from = xmpp_stanza_get_from(stanza);
-    Jid *msg_jid = jid_create(stanza_from);
-    if (g_strcmp0(my_jid->barejid, msg_jid->barejid) != 0) {
+    if (g_strcmp0(my_jid->barejid, stanza_from) != 0) {
         log_warning("Invalid carbon received, from: %s", stanza_from);
         return TRUE;
     }