1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

Removed string allocation in stanza when joining room

This commit is contained in:
James Booth 2014-06-15 22:26:28 +01:00
parent 1c62d7fda8
commit 6483bc8d7c

View File

@ -363,7 +363,7 @@ stanza_create_room_join_presence(xmpp_ctx_t * const ctx,
xmpp_stanza_t *pass = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(pass, "password");
xmpp_stanza_t *text = xmpp_stanza_new(ctx);
xmpp_stanza_set_text(text, strdup(passwd));
xmpp_stanza_set_text(text, passwd);
xmpp_stanza_add_child(pass, text);
xmpp_stanza_add_child(x, pass);
xmpp_stanza_release(text);