diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/connection.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index 5a97a525..a7cdbc1a 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -117,7 +117,13 @@ _jabber_connect_with_account(const ProfAccount * const account) log_info("Connecting using account: %s", account->name); // save account name and password for reconnect + if (saved_account.name != NULL) { + free(saved_account.name); + } saved_account.name = strdup(account->name); + if (saved_account.passwd != NULL) { + free(saved_account.passwd); + } saved_account.passwd = strdup(account->password); // connect with fulljid |