1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 10:33:25 +01:00

fix memory leak

This commit is contained in:
Jfreegman 2015-02-19 21:24:52 -05:00
parent 5c98c1c51e
commit c3179b3b22
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -112,6 +112,13 @@ static void realloc_blocklist(int n)
void kill_friendlist(void)
{
size_t i;
for (i = 0; i < Friends.max_idx; ++i) {
if (Friends.list[i].group_invite.data != NULL)
free(Friends.list[i].group_invite.data);
}
realloc_blocklist(0);
realloc_friends(0);
}