From 1bc977452dc7824ebb86df1c1ba5e14cd0ff83b7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 14 Apr 2019 23:13:57 +0200 Subject: 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 --- core/divelist.c | 1 + core/divesite.c | 1 + 2 files changed, 2 insertions(+) diff --git a/core/divelist.c b/core/divelist.c index 8881aceeb..be0d95852 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -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); } } diff --git a/core/divesite.c b/core/divesite.c index 85ce8da37..b5ce99a8d 100644 --- a/core/divesite.c +++ b/core/divesite.c @@ -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); } -- cgit v1.2.3-70-g09d2