aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/block_processor/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/block_processor/backend.c')
-rw-r--r--lib/sqfs/block_processor/backend.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/sqfs/block_processor/backend.c b/lib/sqfs/block_processor/backend.c
index d71c632..f81304b 100644
--- a/lib/sqfs/block_processor/backend.c
+++ b/lib/sqfs/block_processor/backend.c
@@ -152,8 +152,16 @@ static int process_completed_fragment(sqfs_block_processor_t *proc,
search.hash = frag->checksum;
search.size = frag->size;
+ proc->current_frag = frag;
+ proc->fblk_lookup_error = 0;
entry = hash_table_search_pre_hashed(proc->frag_ht,
search.hash, &search);
+ proc->current_frag = NULL;
+
+ if (proc->fblk_lookup_error != 0) {
+ err = proc->fblk_lookup_error;
+ goto fail;
+ }
if (entry != NULL) {
if (frag->inode != NULL) {
@@ -219,8 +227,16 @@ static int process_completed_fragment(sqfs_block_processor_t *proc,
chunk->size = frag->size;
chunk->hash = frag->checksum;
+ proc->current_frag = frag;
+ proc->fblk_lookup_error = 0;
entry = hash_table_insert_pre_hashed(proc->frag_ht, chunk->hash,
chunk, chunk);
+ proc->current_frag = NULL;
+
+ if (proc->fblk_lookup_error != 0) {
+ err = proc->fblk_lookup_error;
+ goto fail;
+ }
if (entry == NULL)
goto fail;