mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:13:25 +00:00
Cleanup: free all data in clear_table()
Instead of calling free() on all dives, call free_dive() which also frees additional allocated data, not only the dive struct. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0b57b8d59f
commit
444354ec9b
1 changed files with 1 additions and 1 deletions
|
@ -1691,7 +1691,7 @@ void clear_dive_file_data()
|
|||
void clear_table(struct dive_table *table)
|
||||
{
|
||||
for (int i = 0; i < table->nr; i++)
|
||||
free(table->dives[i]);
|
||||
free_dive(table->dives[i]);
|
||||
table->nr = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue