1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

Fix memory leak in accounts_get_login_status()

This commit is contained in:
Dmitry Podgorny 2021-07-17 18:11:32 +03:00
parent 45fd229c11
commit e7b6051e57
2 changed files with 6 additions and 1 deletions

View File

@ -958,6 +958,10 @@ accounts_get_login_status(const char* const account_name)
if (g_strcmp0(setting, "last") == 0) {
status = accounts_get_last_status(account_name);
}
if (setting) {
g_free(setting);
}
return status;
}

View File

@ -193,7 +193,8 @@ sv_ev_roster_received(void)
cl_ev_presence_send(conn_presence, 0);
}
free(last_activity_str);
g_free(status_message);
g_free(last_activity_str);
const char* fulljid = connection_get_fulljid();
plugins_on_connect(account_name, fulljid);