summaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-21 19:52:37 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-23 08:06:17 +0100
commit46bf8bf2fa37f1aae44241a5f7d846810041aac9 (patch)
tree46abbf0adaad88bd4248ade4b4078b079141b505 /core/dive.c
parent45f4dac70a766138bdd7544c9ef8657b81f63110 (diff)
downloadsubsurface-46bf8bf2fa37f1aae44241a5f7d846810041aac9.tar.gz
Core: export free_picture()
Export the free_picture() function from dive.c. The parser may need this in case of truncated files to free its temporary resources. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r--core/dive.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/dive.c b/core/dive.c
index e486d1a9a..da9410f2d 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -500,7 +500,6 @@ struct dive *alloc_dive(void)
static void free_dc(struct divecomputer *dc);
static void free_dc_contents(struct divecomputer *dc);
-static void free_pic(struct picture *picture);
/* copy an element in a list of dive computer extra data */
static void copy_extra_data(struct extra_data *sed, struct extra_data *ded)
@@ -569,7 +568,7 @@ static void free_dive_structures(struct dive *d)
taglist_free(d->tag_list);
free_dc_contents(&d->dc);
STRUCTURED_LIST_FREE(struct divecomputer, d->dc.next, free_dc);
- STRUCTURED_LIST_FREE(struct picture, d->picture_list, free_pic);
+ STRUCTURED_LIST_FREE(struct picture, d->picture_list, free_picture);
for (int i = 0; i < MAX_CYLINDERS; i++)
free((void *)d->cylinder[i].type.description);
for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++)
@@ -2990,7 +2989,7 @@ static void free_dc(struct divecomputer *dc)
free(dc);
}
-static void free_pic(struct picture *picture)
+void free_picture(struct picture *picture)
{
if (picture) {
free(picture->filename);