diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-01-12 23:32:32 +0200 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-01-12 23:32:32 +0200 |
commit | 9121cbe29578539f489db3b1642aa366b2cfca14 (patch) | |
tree | 9bbafa72989087b94fe153f219ca3887f442e3f1 /src | |
parent | db9c9ab091c40bf2249010816cd0831520afc2e0 (diff) | |
download | profani-tty-9121cbe29578539f489db3b1642aa366b2cfca14.tar.gz |
fixed memory leak in jabber_subscription()
Diffstat (limited to 'src')
-rw-r--r-- | src/jabber.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jabber.c b/src/jabber.c index a3db7d85..7709c405 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -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); |