aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-21 11:05:51 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-21 11:11:00 -0800
commit1ba4137fec5b7f83b37c9165e1081f4062c50052 (patch)
treef0e51311561c2fa3c6fc5d4c2206a3a60da3b7aa
parenta0f7be758502ecf75da13401c4f6721767d27c8a (diff)
downloadsubsurface-1ba4137fec5b7f83b37c9165e1081f4062c50052.tar.gz
Revert "Free tag lists propperly"
No, this causes double free problems. And they show up in the weirdest ways, e.g. when just closing your data file. Or when making changes and re-saving a modified dive. Fixes #794 This reverts commit 0bdd8f41e0b217c6f0a3723dd756e96c93b3f5c6. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--dive.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/dive.c b/dive.c
index 734639312..ad9d6dadb 100644
--- a/dive.c
+++ b/dive.c
@@ -2461,12 +2461,6 @@ static inline void taglist_free_divetag(struct divetag *tag)
free(tag);
}
-static inline void tag_entry_free(struct tag_entry *tag_entry)
-{
- taglist_free_divetag(tag_entry->tag);
- free(tag_entry);
-}
-
/* Add a tag to the tag_list, keep the list sorted */
static struct divetag *taglist_add_divetag(struct tag_entry **tag_list, struct divetag *tag)
{
@@ -2535,7 +2529,7 @@ struct divetag *taglist_add_tag(struct tag_entry **tag_list, const char *tag)
void taglist_free(struct tag_entry *entry)
{
- STRUCTURED_LIST_FREE(struct tag_entry, entry, tag_entry_free)
+ STRUCTURED_LIST_FREE(struct tag_entry, entry, free)
}
/* Merge src1 and src2, write to *dst */