From 62a3a2e1ab14ca97a91376a6cc99be63c05db480 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 25 Mar 2021 14:47:06 +0100 Subject: Fix fail branch in block processor fragment backend Only clean up the fragment if it hasn't been re-assigned to the fragment block. The NULL check is definitely wrong, because we no longer re-assign it as NULL. Signed-off-by: David Oberhollenzer --- lib/sqfs/block_processor/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqfs') diff --git a/lib/sqfs/block_processor/backend.c b/lib/sqfs/block_processor/backend.c index 35e5b4c..616cbe6 100644 --- a/lib/sqfs/block_processor/backend.c +++ b/lib/sqfs/block_processor/backend.c @@ -252,7 +252,7 @@ static int process_completed_fragment(sqfs_block_processor_t *proc, return 0; fail: free(chunk); - if (frag != NULL) + if (frag != proc->frag_block) release_old_block(proc, frag); return err; } -- cgit v1.2.3