about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-27 21:33:02 +0000
committerJames Booth <boothj5@gmail.com>2014-01-27 21:33:02 +0000
commitf26686aeca95f57205a2c26c7b1d5c00b8a63348 (patch)
tree12a51a3ef594183818a39d497faedc718d869bb8
parent1a300ce7d35092b93814eac00008aae3d98819a1 (diff)
downloadprofani-tty-f26686aeca95f57205a2c26c7b1d5c00b8a63348.tar.gz
Removed unnecessary strdup
-rw-r--r--src/xmpp/message.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 236999b9..92ab3374 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -222,10 +222,9 @@ _message_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
         type = xmpp_stanza_get_attribute(error_stanza, STANZA_ATTR_TYPE);
     }
 
-    // handle recipient not found
+    // handle recipient not found ('from' contains a value and type is 'cancel'
     if ((from != NULL) && ((type != NULL && (strcmp(type, "cancel") == 0)))) {
-        char *cpy = strdup(from);
-        handle_recipient_not_found(cpy, err_msg);
+        handle_recipient_not_found(from, err_msg);
     }
 
     return 1;