aboutsummaryrefslogtreecommitdiff
path: root/lib/common/writer/cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/writer/cleanup.c')
-rw-r--r--lib/common/writer/cleanup.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/common/writer/cleanup.c b/lib/common/writer/cleanup.c
index 1af7a99..a3fd039 100644
--- a/lib/common/writer/cleanup.c
+++ b/lib/common/writer/cleanup.c
@@ -10,20 +10,18 @@
void sqfs_writer_cleanup(sqfs_writer_t *sqfs, int status)
{
- if (sqfs->xwr != NULL)
- sqfs_destroy(sqfs->xwr);
-
- sqfs_destroy(sqfs->dirwr);
- sqfs_destroy(sqfs->dm);
- sqfs_destroy(sqfs->im);
- sqfs_destroy(sqfs->idtbl);
- sqfs_destroy(sqfs->data);
- sqfs_destroy(sqfs->blkwr);
- sqfs_destroy(sqfs->fragtbl);
- sqfs_destroy(sqfs->cmp);
- sqfs_destroy(sqfs->uncmp);
+ sqfs_drop(sqfs->xwr);
+ sqfs_drop(sqfs->dirwr);
+ sqfs_drop(sqfs->dm);
+ sqfs_drop(sqfs->im);
+ sqfs_drop(sqfs->idtbl);
+ sqfs_drop(sqfs->data);
+ sqfs_drop(sqfs->blkwr);
+ sqfs_drop(sqfs->fragtbl);
+ sqfs_drop(sqfs->cmp);
+ sqfs_drop(sqfs->uncmp);
fstree_cleanup(&sqfs->fs);
- sqfs_destroy(sqfs->outfile);
+ sqfs_drop(sqfs->outfile);
if (status != EXIT_SUCCESS) {
#if defined(_WIN32) || defined(__WINDOWS__)