aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/data_writer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sqfs/data_writer.c b/lib/sqfs/data_writer.c
index d88c50e..b52e897 100644
--- a/lib/sqfs/data_writer.c
+++ b/lib/sqfs/data_writer.c
@@ -239,12 +239,11 @@ static int handle_fragment(data_writer_t *data, block_t *blk)
fi->fragment_offset = ref->fragment_offset;
fi->fragment = ref->fragment;
fi->flags |= FILE_FLAG_FRAGMENT_IS_DUPLICATE;
- } else {
- if (store_fragment(data, blk))
- return -1;
+ free(blk);
+ return 0;
}
- return 0;
+ return store_fragment(data, blk);
}
static int add_sentinel_block(data_writer_t *data, file_info_t *fi,