mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #841 from stal888/leaky_friends
Properly deallocate friends' status messages in kill_messenger
This commit is contained in:
commit
0e3ad9c624
|
@ -1816,6 +1816,10 @@ void kill_messenger(Messenger *m)
|
|||
kill_DHT(m->dht);
|
||||
kill_net_crypto(m->net_crypto);
|
||||
kill_networking(m->net);
|
||||
for (i = 0; i < m->numfriends; ++i) {
|
||||
if (m->friendlist[i].statusmessage)
|
||||
free(m->friendlist[i].statusmessage);
|
||||
}
|
||||
free(m->friendlist);
|
||||
free(m);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user