core: use free_dive() to free dive

One would think that calling free() on a dive structure, as the code
did in some places, would lead to a memory leak.

(Insert rant about C memory management.)

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-08-20 17:24:45 +02:00 committed by Dirk Hohndel
parent 252761498a
commit 1c00f9f233
5 changed files with 7 additions and 14 deletions

View file

@ -433,7 +433,7 @@ static void parse_dives(int log_version, const unsigned char *buf, unsigned int
//DEBUG save_dives("/tmp/test.xml");
// if we bailed out of the loop, the dive hasn't been recorded and dive hasn't been set to NULL
free(dive);
free_dive(dive);
}
int try_to_open_liquivision(const char *filename, struct memblock *mem, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites)