diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-13 07:09:55 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-13 07:09:55 -0700 |
commit | 3478943f2ff5fae36d59667ffed33b9494d22acd (patch) | |
tree | 55271a007c085c1897563e9ec79a42ca570ed53c /parse-xml.c | |
parent | 15de7f0b716b4e3c28fee4f4ccbac4788a8d84b1 (diff) | |
download | subsurface-3478943f2ff5fae36d59667ffed33b9494d22acd.tar.gz |
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>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c index fb01d4d63..abca70510 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -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; } |