summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dive.c b/dive.c
index 0c4b91fb3..68f619bdd 100644
--- a/dive.c
+++ b/dive.c
@@ -1758,8 +1758,7 @@ static void free_events(struct event *ev)
static void free_dc(struct divecomputer *dc)
{
free(dc->sample);
- if (dc->model)
- free((void *)dc->model);
+ free((void *)dc->model);
free_events(dc->events);
free(dc);
}