summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/divelist.c b/divelist.c
index 8bad4828d..17f24ef7e 100644
--- a/divelist.c
+++ b/divelist.c
@@ -744,11 +744,8 @@ void delete_single_dive(int idx)
free((void *)dive->buddy);
if (dive->suit)
free((void *)dive->suit);
- if (dive->tag_list) {
- taglist_clear(dive->tag_list);
- /* Remove head of list */
- free((void *)dive->tag_list);
- }
+ if (dive->tag_list)
+ taglist_free(dive->tag_list);
free(dive);
}