diff --git a/core/equipment.c b/core/equipment.c index bdecbb3f7..0b40b30c0 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -118,7 +118,6 @@ void add_cylinder_description(const cylinder_type_t *type) if (strcmp(tank_info_table.infos[i].name, desc) == 0) return; } - // FIXME: leaked on exit add_tank_info_metric(&tank_info_table, desc, type->size.mliter, type->workingpressure.mbar / 1000); } diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp index af7352ec5..f3bd05821 100644 --- a/subsurface-desktop-main.cpp +++ b/subsurface-desktop-main.cpp @@ -116,6 +116,7 @@ int main(int argc, char **argv) qPref::sync(); free_prefs(); + clear_tank_info_table(&tank_info_table); return 0; } diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index 255f20053..21b0dfe46 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -86,6 +86,7 @@ int main(int argc, char **argv) qPref::sync(); free_prefs(); + clear_tank_info_table(&tank_info_table); return 0; }