summaryrefslogtreecommitdiff
path: root/lib/sqfs/block_processor/frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/block_processor/frontend.c')
-rw-r--r--lib/sqfs/block_processor/frontend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqfs/block_processor/frontend.c b/lib/sqfs/block_processor/frontend.c
index ccf54c0..a4a38e9 100644
--- a/lib/sqfs/block_processor/frontend.c
+++ b/lib/sqfs/block_processor/frontend.c
@@ -28,6 +28,8 @@ static int get_new_block(sqfs_block_processor_t *proc, sqfs_block_t **out)
memset(blk, 0, sizeof(*blk));
*out = blk;
+
+ proc->backlog += 1;
return 0;
}
@@ -56,11 +58,11 @@ int enqueue_block(sqfs_block_processor_t *proc, sqfs_block_t *blk)
if (status == 0)
status = SQFS_ERROR_ALLOC;
- free(blk);
+ blk->next = proc->free_list;
+ proc->free_list = blk;
return status;
}
- proc->backlog += 1;
return 0;
}