summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index d24675927..e520d9b75 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -313,7 +313,11 @@ static void file_close(GtkWidget *w, gpointer data)
free(get_dive(i));
dive_table.nr = 0;
dive_table.preexisting = 0;
- g_list_free_full(dive_trip_list, free);
+
+ /* inlined version of g_list_free_full(dive_trip_list, free); */
+ g_list_foreach(dive_trip_list, (GFunc)free, NULL);
+ g_list_free(dive_trip_list);
+
dive_trip_list = NULL;
/* clear the selection and the statistics */