core: free tank info table on exit
This is obviously a pure code-hygiene thing. But with the new dynamic tank info table, this becomes trivial, so let's do it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
50b11024d6
commit
d16a9f118a
@ -118,7 +118,6 @@ void add_cylinder_description(const cylinder_type_t *type)
|
|||||||
if (strcmp(tank_info_table.infos[i].name, desc) == 0)
|
if (strcmp(tank_info_table.infos[i].name, desc) == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// FIXME: leaked on exit
|
|
||||||
add_tank_info_metric(&tank_info_table, desc, type->size.mliter,
|
add_tank_info_metric(&tank_info_table, desc, type->size.mliter,
|
||||||
type->workingpressure.mbar / 1000);
|
type->workingpressure.mbar / 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,6 +116,7 @@ int main(int argc, char **argv)
|
|||||||
qPref::sync();
|
qPref::sync();
|
||||||
|
|
||||||
free_prefs();
|
free_prefs();
|
||||||
|
clear_tank_info_table(&tank_info_table);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,6 +86,7 @@ int main(int argc, char **argv)
|
|||||||
qPref::sync();
|
qPref::sync();
|
||||||
|
|
||||||
free_prefs();
|
free_prefs();
|
||||||
|
clear_tank_info_table(&tank_info_table);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user