mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-15 07:23:02 +01:00
fix memory leak
This commit is contained in:
parent
5c98c1c51e
commit
c3179b3b22
@ -112,6 +112,13 @@ static void realloc_blocklist(int n)
|
|||||||
|
|
||||||
void kill_friendlist(void)
|
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_blocklist(0);
|
||||||
realloc_friends(0);
|
realloc_friends(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user