diff options
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6,7 +6,7 @@ struct leg *leg_init(int points, char *name) { struct leg *l = calloc(1, sizeof(*l)); - l->name = name; + l->name = strdup(name); l->start = l->rem = points; l->size_visits = 16; l->visits = calloc(l->size_visits, sizeof(*(l->visits))); @@ -23,6 +23,7 @@ void leg_free(struct leg *l) free(l->visits[i].ccoords); } free(l->visits); + free(l->name); free(l); } |