diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 1c710522..3d96f6ca 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -2083,7 +2083,7 @@ void kill_messenger(Messenger *m) for (i = 0; i < m->numfriends; ++i) { free(m->friendlist[i].statusmessage); - free(m->friendlist[friendnumber].avatar_recv_data); + free(m->friendlist[i].avatar_recv_data); } free(m->avatar_data);