mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-20 18:36:37 +02:00
fix memory leak
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user