From c3179b3b2282e32323c0e3ba3343ba9e9ded854d Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Thu, 19 Feb 2015 21:24:52 -0500 Subject: [PATCH] fix memory leak --- src/friendlist.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/friendlist.c b/src/friendlist.c index 1e95a0e..4ea76d3 100644 --- a/src/friendlist.c +++ b/src/friendlist.c @@ -112,6 +112,13 @@ static void realloc_blocklist(int n) 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_friends(0); }