Fix real memory leak

We can't keep the cache around (even though it's tempting) as the next
iteration might change the start time of the planned dive or other
parameters which would make the cached data invalid.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-03-06 14:26:33 -08:00
parent 3e8e005aa3
commit c64227efe0

View file

@ -1445,6 +1445,8 @@ void DivePlannerPointsModel::createTemporaryPlan()
copy_samples(tempDive, current_dive); copy_samples(tempDive, current_dive);
copy_events(tempDive, current_dive); copy_events(tempDive, current_dive);
} }
// throw away the cache
free(cache);
#if DEBUG_PLAN #if DEBUG_PLAN
dump_plan(&diveplan); dump_plan(&diveplan);
#endif #endif