diff options
Diffstat (limited to 'core/divelist.c')
-rw-r--r-- | core/divelist.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/core/divelist.c b/core/divelist.c index 62af3120c..84290e6b6 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -931,14 +931,7 @@ void delete_single_dive(int idx) for (i = idx; i < dive_table.nr - 1; i++) dive_table.dives[i] = dive_table.dives[i + 1]; dive_table.dives[--dive_table.nr] = NULL; - /* free all allocations */ - free(dive->dc.sample); - free((void *)dive->notes); - free((void *)dive->divemaster); - free((void *)dive->buddy); - free((void *)dive->suit); - taglist_free(dive->tag_list); - free(dive); + free_dive(dive); } struct dive **grow_dive_table(struct dive_table *table) |