summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-14 23:13:57 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-15 10:21:10 +1200
commit1bc977452dc7824ebb86df1c1ba5e14cd0ff83b7 (patch)
tree1a4f3ec0d9440949f2e2ec700f42c19de3671cf7 /core
parent5966a74ae36f61ee73eb1b585068a4677b4f7324 (diff)
downloadsubsurface-1bc977452dc7824ebb86df1c1ba5e14cd0ff83b7.tar.gz
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>
Diffstat (limited to 'core')
-rw-r--r--core/divelist.c1
-rw-r--r--core/divesite.c1
2 files changed, 2 insertions, 0 deletions
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);
}