Cleanup: free dive table in trips and dive sites

Trips and dive sites were changed to use dive tables instead
of linked lists. But the memory used for the tables wasn't freed.
Do this.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-04-14 23:13:57 +02:00 committed by Dirk Hohndel
parent 5966a74ae3
commit 1bc977452d
2 changed files with 2 additions and 0 deletions

View file

@ -715,6 +715,7 @@ void free_trip(dive_trip_t *trip)
if (trip) {
free(trip->location);
free(trip->notes);
free(trip->dives.dives);
free(trip);
}
}

View file

@ -207,6 +207,7 @@ void free_dive_site(struct dive_site *ds)
free(ds->name);
free(ds->notes);
free(ds->description);
free(ds->dives.dives);
free_taxonomy(&ds->taxonomy);
free(ds);
}