diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-01-07 21:21:19 +0200 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-01-07 21:21:19 +0200 |
commit | 621832ee4a621f82f4bd693e7c7bf52944c3671a (patch) | |
tree | 35aa0f23995d5987c48f64e06c3aba55c054b820 | |
parent | 59676bd16e69c37b07a12c4f2a3296195f9e1d76 (diff) | |
download | profani-tty-621832ee4a621f82f4bd693e7c7bf52944c3671a.tar.gz |
free resources when login attempt fails
The next call of jabber_connect allocates these resources again.
-rw-r--r-- | src/jabber.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/jabber.c b/src/jabber.c index fb558020..8d2dc572 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -804,17 +804,9 @@ _connection_handler(xmpp_conn_t * const conn, } else { if (reconnect_timer == NULL) { prof_handle_failed_login(); - if (saved_user != NULL) { - free(saved_user); - saved_user = NULL; - } - if (saved_password != NULL) { - free(saved_password); - saved_password = NULL; - } - xmpp_stop(ctx); jabber_conn.conn_status = JABBER_DISCONNECTED; jabber_conn.presence = PRESENCE_OFFLINE; + jabber_free_resources(); } else { xmpp_stop(ctx); if (prefs_get_reconnect() != 0) { |