Properly deallocate friends' status messages in kill_messenger

Lightly tested. I'm not sure whether this creates a double-free
bug
This commit is contained in:
stal 2014-04-23 17:29:50 -07:00
parent 38e3b3516c
commit 2b28353554
No known key found for this signature in database
GPG Key ID: 7DA5235FF82F7932

View File

@ -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);
}