mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix memory handling for taxonomy data
The way we freed things and cleared out the variables potentially left dangling data behind and could end up calling free on garbage data, leading to random crashes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
15de7f0b71
commit
3478943f2f
4 changed files with 10 additions and 11 deletions
|
@ -1527,7 +1527,7 @@ static void dive_site_end(void)
|
|||
if (verbose > 3)
|
||||
printf("completed dive site uuid %x8 name {%s}\n", ds->uuid, ds->name);
|
||||
}
|
||||
free_taxonomy(cur_dive_site->taxonomy.category);
|
||||
free_taxonomy(&cur_dive_site->taxonomy);
|
||||
free(cur_dive_site);
|
||||
cur_dive_site = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue