mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Free saved account details before replacing
This commit is contained in:
parent
d181f500ea
commit
d6d714e1ed
@ -117,7 +117,13 @@ _jabber_connect_with_account(const ProfAccount * const account)
|
|||||||
log_info("Connecting using account: %s", account->name);
|
log_info("Connecting using account: %s", account->name);
|
||||||
|
|
||||||
// save account name and password for reconnect
|
// save account name and password for reconnect
|
||||||
|
if (saved_account.name != NULL) {
|
||||||
|
free(saved_account.name);
|
||||||
|
}
|
||||||
saved_account.name = strdup(account->name);
|
saved_account.name = strdup(account->name);
|
||||||
|
if (saved_account.passwd != NULL) {
|
||||||
|
free(saved_account.passwd);
|
||||||
|
}
|
||||||
saved_account.passwd = strdup(account->password);
|
saved_account.passwd = strdup(account->password);
|
||||||
|
|
||||||
// connect with fulljid
|
// connect with fulljid
|
||||||
|
Loading…
Reference in New Issue
Block a user