summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/match.c b/match.c
index 17ce3b1..08c0a3a 100644
--- a/match.c
+++ b/match.c
@@ -14,9 +14,12 @@ struct leg *leg_init(int points, char *name)
void leg_free(struct leg *l)
{
- for (int i = 0; i < l->n_visits; ++i)
+ for (int i = 0; i < l->n_visits; ++i) {
if (l->visits[i].darts)
free(l->visits[i].darts);
+ if (l->visits[i].ccoords)
+ free(l->visits[i].ccoords);
+ }
free(l->visits);
free(l);
}