mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 22:16:21 +00:00
free resources when login attempt fails
The next call of jabber_connect allocates these resources again.
This commit is contained in:
10
src/jabber.c
10
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) {
|
||||
|
||||
Reference in New Issue
Block a user