Cleanup: avoid a few memory leaks
Coverity CID 215199 Coverity CID 215195 Coverity CID 215196 Coverity CID 215198 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
65213f044e
commit
652e382e68
@ -177,6 +177,7 @@ void ostctools_import(const char *file, struct dive_table *divetable)
|
||||
sort_table(divetable);
|
||||
fclose(archive);
|
||||
out:
|
||||
free(archive);
|
||||
free(devdata);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
@ -1019,7 +1019,7 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, s
|
||||
if (in_planner() && prefs.display_variations && decoMode() != RECREATIONAL) {
|
||||
int my_instance = ++instanceCounter;
|
||||
cache_deco_state(&ds, &save);
|
||||
|
||||
|
||||
duration_t delta_time = { .seconds = 60 };
|
||||
QString time_units = tr("min");
|
||||
depth_t delta_depth;
|
||||
@ -1089,6 +1089,9 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, s
|
||||
finish:
|
||||
free_dps(original_plan);
|
||||
free(original_plan);
|
||||
free(save);
|
||||
free(cache);
|
||||
free(dive);
|
||||
// setRecalc(oldRecalc);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user