Clean double free in copy_dive_site()
This makes subsurface crash by simply clicking a dive in the list. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f9c3142fa7
commit
097d65521a
@ -171,7 +171,6 @@ void copy_dive_site(struct dive_site *orig, struct dive_site *copy)
|
||||
copy->uuid = orig->uuid;
|
||||
if (orig->taxonomy.category == NULL) {
|
||||
free_taxonomy(copy->taxonomy.category);
|
||||
free(copy->taxonomy.category);
|
||||
copy->taxonomy.category = NULL;
|
||||
copy->taxonomy.nr = 0;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user