minitox.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/minitox.c b/minitox.c
index 53aa5fc..d590783 100644
--- a/minitox.c
+++ b/minitox.c
@@ -1077,6 +1077,9 @@ void _command_accept(int narg, char **args, bool is_accept) {
}
}
}
+ if (!req->is_friend_request) {
+ free(req->userdata.group.cookie);
+ }
free(req->msg);
free(req);
return;