1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

fixed memory leak in jabber_subscription()

This commit is contained in:
Dmitry Podgorny 2013-01-12 23:32:32 +02:00
parent db9c9ab091
commit 9121cbe295

View File

@ -295,8 +295,10 @@ jabber_subscription(const char * const jid, jabber_subscr_t action)
type = STANZA_TYPE_SUBSCRIBED;
else if (action == PRESENCE_UNSUBSCRIBED)
type = STANZA_TYPE_UNSUBSCRIBED;
else // unknown action
else { // unknown action
free(jid_cpy);
return;
}
presence = xmpp_stanza_new(jabber_conn.ctx);
xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);